예제 #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()));
 }
예제 #2
0
  @Test
  public void testGetChildrenAndParentsReturnsProxies() {
    TestEntity child = (TestEntity) Iterables.get(app.getChildren(), 0);
    Application parent = (Application) child.getParent();

    assertIsProxy(child);
    assertIsProxy(parent);
  }