mgr.put(entity);
mgr.flush();
addAndSaveActivity1(mgr, entity, "dean", "act1");
addAndSaveActivity1(mgr, entity, "werwer", "act2");
NoSqlEntityManager mgr1 = factory.createEntityManager();
SomeEntity acc1 = mgr1.find(SomeEntity.class, entity.getId());
NoSqlEntityManager mgr2 = factory.createEntityManager();
SomeEntity acc2 = mgr2.find(SomeEntity.class, entity.getId());
deleteActivity(mgr1, acc1, "dean");
deleteActivity(mgr2, acc2, "werwer");
NoSqlEntityManager mgr3 = factory.createEntityManager();
//Now, we should have no activities in our account list
SomeEntity theAccount = mgr3.find(SomeEntity.class, entity.getId());
Assert.assertEquals(0, theAccount.getActivities().size());
}