@Test
  public void testBootstrap() throws DatastoreException, NotFoundException {
    assertNotNull(nodeDao);
    assertNotNull(entityBootstrapper);
    assertNotNull(entityBootstrapper.getBootstrapEntities());
    // Make sure we can find each entity
    List<EntityBootstrapData> list = entityBootstrapper.getBootstrapEntities();
    for (EntityBootstrapData entityBoot : list) {
      // Look up the entity
      String id = nodeDao.getNodeIdForPath(entityBoot.getEntityPath());
      assertNotNull(id);
      Node node = nodeDao.getNode(id);
      assertNotNull(node);
      String benenefactorId = nodeInheritanceDao.getBenefactor(id);
      // This node should inherit from itself
      assertEquals("A bootstrapped node should be its own benefactor", id, benenefactorId);

      // root nodes don't have ACLs
      try {
        AccessControlList acl = accessControlListDAO.get(id, ObjectType.ENTITY);
        assertNotNull(acl);
      } catch (NotFoundException nfe) {
        throw new NotFoundException("id=" + id);
      }
    }
  }
 @Test
 public void testRerunBootstrap() throws Exception {
   assertNotNull(nodeDao);
   assertNotNull(entityBootstrapper);
   assertNotNull(entityBootstrapper.getBootstrapEntities());
   // Make sure that we can rerun the bootstrapper
   entityBootstrapper.bootstrapAll();
   // Make sure we can find each entity
   List<EntityBootstrapData> list = entityBootstrapper.getBootstrapEntities();
   for (EntityBootstrapData entityBoot : list) {
     // Look up the entity
     String id = nodeDao.getNodeIdForPath(entityBoot.getEntityPath());
     assertNotNull(id);
   }
 }