Introducing a couple of real test cases.

Also, basic PIT test shows that everything works as expected...

There was one big change in PIT. Previously, when PIT entry was
satisfied, it was immediately removed. As of recently, PIT entry is
immediately removed.
diff --git a/model/ccnx-fib-impl.cc b/model/ccnx-fib-impl.cc
index e298875..10217e3 100644
--- a/model/ccnx-fib-impl.cc
+++ b/model/ccnx-fib-impl.cc
@@ -200,6 +200,12 @@
     }
 }
 
+uint32_t
+CcnxFibImpl::GetSize () const
+{
+  return super::getPolicy ().size ();
+}
+
 Ptr<const CcnxFibEntry>
 CcnxFibImpl::Begin ()
 {
diff --git a/model/ccnx-fib-impl.h b/model/ccnx-fib-impl.h
index 2768a7d..eaedeee 100644
--- a/model/ccnx-fib-impl.h
+++ b/model/ccnx-fib-impl.h
@@ -25,7 +25,7 @@
 #include "ns3/ccnx-name-components.h"
 
 #include "../utils/trie-with-policy.h"
-#include "../utils/empty-policy.h"
+#include "../utils/counting-policy.h"
 
 namespace ns3 {
 
@@ -35,7 +35,7 @@
   typedef ndnSIM::trie_with_policy<
     CcnxNameComponents,
     ndnSIM::smart_pointer_payload_traits<CcnxFibEntryImpl>,
-    ndnSIM::empty_policy_traits
+    ndnSIM::counting_policy_traits
     > trie;
 
   CcnxFibEntryImpl (const Ptr<const CcnxNameComponents> &prefix)
@@ -62,7 +62,7 @@
   typedef ndnSIM::trie_with_policy<
     CcnxNameComponents,
     ndnSIM::smart_pointer_payload_traits<CcnxFibEntryImpl>,
-    ndnSIM::empty_policy_traits
+    ndnSIM::counting_policy_traits
     > type;
 };
 
@@ -109,6 +109,9 @@
   virtual void
   Print (std::ostream &os) const;
 
+  virtual uint32_t
+  GetSize () const;
+
   virtual Ptr<const CcnxFibEntry>
   Begin ();
 
diff --git a/model/ccnx-fib.h b/model/ccnx-fib.h
index e5bda1e..eae0c65 100644
--- a/model/ccnx-fib.h
+++ b/model/ccnx-fib.h
@@ -132,6 +132,12 @@
   Print (std::ostream &os) const = 0;
 
   /**
+   * @brief Get number of entries in FIB
+   */
+  virtual uint32_t
+  GetSize () const = 0;
+
+  /**
    * @brief Return first element of FIB (no order guaranteed)
    */
   virtual Ptr<const CcnxFibEntry>
diff --git a/model/ccnx-name-components.cc b/model/ccnx-name-components.cc
index 893f7bb..a79b6bb 100644
--- a/model/ccnx-name-components.cc
+++ b/model/ccnx-name-components.cc
@@ -43,7 +43,14 @@
       Add (component.get ());
     }
 }
-  
+
+CcnxNameComponents::CcnxNameComponents (const std::string &prefix)
+{
+  istringstream is (prefix);
+  is >> *this;
+}
+
+
 const std::list<std::string> &
 CcnxNameComponents::GetComponents () const
 {
diff --git a/model/ccnx-name-components.h b/model/ccnx-name-components.h
index 1d8ef2a..eb4f8c1 100644
--- a/model/ccnx-name-components.h
+++ b/model/ccnx-name-components.h
@@ -63,6 +63,13 @@
   CcnxNameComponents (const std::list<boost::reference_wrapper<const std::string> > &components);
 
   /**
+   * @brief Constructor
+   * Creates a prefix from the string (string is parsed using operator>>)
+   * @param[in] prefix A string representation of a prefix
+   */
+  CcnxNameComponents (const std::string &prefix);
+  
+  /**
    * \brief Generic Add method
    * Appends object of type T to the list of components 
    * @param[in] value The object to be appended
diff --git a/model/ccnx-pit-entry.cc b/model/ccnx-pit-entry.cc
index dde19e7..4b075ab 100644
--- a/model/ccnx-pit-entry.cc
+++ b/model/ccnx-pit-entry.cc
@@ -41,7 +41,9 @@
                             Ptr<CcnxFibEntry> fibEntry)
   : m_container (container)
   , m_prefix (header->GetNamePtr ())
-  , m_expireTime (Simulator::Now () + header->GetInterestLifetime ())
+  , m_expireTime (Simulator::Now () + (!header->GetInterestLifetime ().IsZero ()?
+                                       header->GetInterestLifetime ():
+                                       Seconds (1.0)))
   , m_fibEntry (fibEntry)
   , m_maxRetxCount (0)
 {
diff --git a/model/ccnx-pit-impl.cc b/model/ccnx-pit-impl.cc
index 0dcfef2..f68f9dd 100644
--- a/model/ccnx-pit-impl.cc
+++ b/model/ccnx-pit-impl.cc
@@ -110,9 +110,18 @@
 {
   m_cleanEvent.Cancel ();
   if (i_time.empty ())
-    return;
+    {
+      NS_LOG_DEBUG ("No items in PIT");
+      return;
+    }
 
-  m_cleanEvent = Simulator::Schedule (i_time.begin ()->GetExpireTime (),
+  Time nextEvent = i_time.begin ()->GetExpireTime () - Simulator::Now ();
+  if (nextEvent < 0) nextEvent = Seconds (0);
+  
+  NS_LOG_DEBUG ("Schedule next cleaning in " <<
+                nextEvent.ToDouble (Time::S) << "s (at " <<
+                i_time.begin ()->GetExpireTime () << "s abs time");
+  m_cleanEvent = Simulator::Schedule (nextEvent,
                                       &CcnxPitImpl::CleanExpired, this);
 }
 
@@ -217,6 +226,12 @@
     }
 }
 
+uint32_t
+CcnxPitImpl::GetSize () const
+{
+  return super::getPolicy ().size ();
+}
+
 Ptr<CcnxPitEntry>
 CcnxPitImpl::Begin ()
 {
diff --git a/model/ccnx-pit-impl.h b/model/ccnx-pit-impl.h
index d03134c..123ed85 100644
--- a/model/ccnx-pit-impl.h
+++ b/model/ccnx-pit-impl.h
@@ -82,6 +82,9 @@
   virtual void
   Print (std::ostream &os) const;
 
+  virtual uint32_t
+  GetSize () const;
+
   virtual Ptr<CcnxPitEntry>
   Begin ();
 
diff --git a/model/ccnx-pit.h b/model/ccnx-pit.h
index 0ae3968..941b079 100644
--- a/model/ccnx-pit.h
+++ b/model/ccnx-pit.h
@@ -113,19 +113,11 @@
   virtual void
   Print (std::ostream &os) const = 0;
 
-  // template<class A,class M>
-  // void
-  // modify (A, M)
-  // {
-  //   ;
-  // }
-
-  // template<class A>
-  // void
-  // erase (A)
-  // {
-  //   ;
-  // }
+  /**
+   * @brief Get number of entries in PIT
+   */
+  virtual uint32_t
+  GetSize () const = 0;
 
   /**
    * @brief Return first element of FIB (no order guaranteed)