Esempio n. 1
0
 @Test
 public void testCreateAndManageChild() {
   TestEntity result = entity.createAndManageChild(TestEntity.Spec.newInstance());
   assertIsProxy(result);
   assertIsProxy(Iterables.get(entity.getChildren(), 0));
   assertIsProxy(result.getParent());
   assertIsProxy(managementContext.getEntityManager().getEntity(result.getId()));
 }
Esempio n. 2
0
  @Test
  public void testGetChildrenAndParentsReturnsProxies() {
    TestEntity child = (TestEntity) Iterables.get(app.getChildren(), 0);
    Application parent = (Application) child.getParent();

    assertIsProxy(child);
    assertIsProxy(parent);
  }