### Question:
EdmxProvider extends EdmProvider { @Override public EntityType getEntityType(final FullQualifiedName edmFQName) throws ODataException { for (Schema schema : dataServices.getSchemas()) { if (schema.getNamespace().equals(edmFQName.getNamespace())) { for (EntityType entityType : schema.getEntityTypes()) { if (entityType.getName().equals(edmFQName.getName())) { return entityType; } } } } return null; }  EdmxProvider parse(final InputStream in, final boolean validate); @Override EntityContainerInfo getEntityContainerInfo(final String name); @Override EntityType getEntityType(final FullQualifiedName edmFQName); @Override ComplexType getComplexType(final FullQualifiedName edmFQName); @Override Association getAssociation(final FullQualifiedName edmFQName); @Override EntitySet getEntitySet(final String entityContainer, final String name); @Override AssociationSet getAssociationSet(final String entityContainer, final FullQualifiedName association,
      final String sourceEntitySetName, final String sourceEntitySetRole); @Override FunctionImport getFunctionImport(final String entityContainer, final String name); @Override List<Schema> getSchemas(); @Override List<AliasInfo> getAliasInfos();  }### Answer:
@Test public void annotationsAtSimpleProperty() throws Exception { Edm edm = createEdm(); assertNotNull(edm); EdmProperty property = (EdmProperty) edm.getEntityType("Self", "Employee").getProperty("EmployeeName"); assertNotNull(property); EdmAnnotations annotations = property.getAnnotations(); assertNotNull(annotations); List<EdmAnnotationAttribute> annotationAttributes = annotations.getAnnotationAttributes(); assertNotNull(annotationAttributes); List<EdmAnnotationElement> annotationElements = annotations.getAnnotationElements(); assertNotNull(annotationElements); assertEquals(2, annotationElements.size()); assertNull(annotationElements.get(0).getChildElements()); }
@Test public void nullAnnotationsAtEntityType() throws Exception { Edm edm = createEdm(); assertNotNull(edm); EdmAnnotations annotations = edm.getEntityType("Self", "Employee").getAnnotations(); checkNullAnnotations(annotations); }
@Test public void nullAnnotationsAtSimpleProperty() throws Exception { Edm edm = createEdm(); assertNotNull(edm); EdmProperty property = (EdmProperty) edm.getEntityType("Self", "Employee").getProperty("RoomId"); EdmAnnotations annotations = property.getAnnotations(); checkNullAnnotations(annotations); }
@Test public void nullAnnotationsAtComplexProperty() throws Exception { Edm edm = createEdm(); assertNotNull(edm); EdmProperty property = (EdmProperty) edm.getEntityType("Self", "Employee").getProperty("Location"); EdmAnnotations annotations = property.getAnnotations(); checkNullAnnotations(annotations); }
@Test public void nullAnnotationsAtNavigationProperty() throws Exception { Edm edm = createEdm(); assertNotNull(edm); EdmNavigationProperty property = (EdmNavigationProperty) edm.getEntityType("Self", "Employee").getProperty("ne_Manager"); EdmAnnotations annotations = property.getAnnotations(); checkNullAnnotations(annotations); }
@Test public void testEntityType() throws Exception { Edm edm = createEdm(); assertNotNull(edm); FullQualifiedName fqNameEmployee = new FullQualifiedName("RefScenario", "Employee"); EdmProvider testProvider = new EdmTestProvider(); EdmImplProv edmImpl = (EdmImplProv) edm; EntityType employee = edmImpl.getEdmProvider().getEntityType(fqNameEmployee); EntityType testEmployee = testProvider.getEntityType(fqNameEmployee); assertEquals(testEmployee.getName(), employee.getName()); assertEquals(testEmployee.isHasStream(), employee.isHasStream()); assertEquals(testEmployee.getProperties().size(), employee.getProperties().size()); assertEquals(testEmployee.getNavigationProperties().size(), employee.getNavigationProperties().size()); }