/** Test more general constructor. */
 @Test
 public void testLeafNodeBigIntegerParentNode() {
   assertEquals("Leaf bucket should have prefix one", BigInteger.ONE, leaf.getPrefix());
   assertEquals("Parent should be pseudoRoot", pseudoRoot, leaf.getParent());
   assertNotNull("Bucket map should have been initialised", leaf.kBucket);
   assertNotNull("Cache map should have been initialised", leaf.getReplacementCache());
 }
 /** Test root-bucket constructor. */
 @Test
 public void testLeafNodeParentNode() {
   assertEquals("Root bucket should have prefix zero", BigInteger.ZERO, root.getPrefix());
   assertEquals("Parent should be pseudoRoot", pseudoRoot, root.getParent());
   assertNotNull("Bucket map should have been initialised", root.kBucket);
   assertNotNull("Cache map should have been initialised", root.getReplacementCache());
 }
 /** Test accept. */
 @Test
 public void testAccept() {
   VisitorStub visitor = new VisitorStub();
   leaf.accept(visitor);
   assertTrue("LeafNode-visit-method should have been called in visitor", visitor.called);
 }