EntityContainerInfo entityContainer = new EntityContainerInfo().setName("Container");
when(edmProvider.getEntityContainerInfo("Container")).thenReturn(entityContainer);
EdmEntityContainerImplProv edmEntityContainer = new EdmEntityContainerImplProv(edmImplProv, entityContainer);
EntitySet entitySetFoo = new EntitySet().setName("foo");
when(edmProvider.getEntitySet("Container", "foo")).thenReturn(entitySetFoo);
List<NavigationProperty> navigationProperties = new ArrayList<NavigationProperty>();
FullQualifiedName fooBarAssocName = new FullQualifiedName("namespace", "fooBarAssoc");
navigationProperties.add(new NavigationProperty().setName("fooBarNav").setFromRole("fromFoo").setRelationship(
fooBarAssocName).setToRole("toBar"));
EntityType fooEntityType = new EntityType().setName("fooEntityType").setNavigationProperties(navigationProperties);
FullQualifiedName fooEntityTypeFullName = new FullQualifiedName("namespace", "fooEntityType");
entitySetFoo.setEntityType(fooEntityTypeFullName);
when(edmProvider.getEntityType(fooEntityTypeFullName)).thenReturn(fooEntityType);
EntitySet entitySetBar = new EntitySet().setName("bar");
when(edmProvider.getEntitySet("Container", "bar")).thenReturn(entitySetBar);
EntityType barEntityType = new EntityType().setName("barEntityType");
FullQualifiedName barEntityTypeFullName = new FullQualifiedName("namespace", "barEntityType");
entitySetBar.setEntityType(barEntityTypeFullName);
when(edmProvider.getEntityType(barEntityTypeFullName)).thenReturn(barEntityType);
AssociationEnd fooEnd = new AssociationEnd().setRole("fromFoo");
AssociationEnd barEnd = new AssociationEnd().setRole("toBar");