### Question:
EdmImpl implements Edm { @Override public EdmEntityType getEntityType(final String namespaceOrAlias, final String name) throws EdmException { String finalNamespace = getNamespaceForAlias(namespaceOrAlias); FullQualifiedName fqName = new FullQualifiedName(finalNamespace, name); if (edmEntityTypes.containsKey(fqName)) { return edmEntityTypes.get(fqName); } EdmEntityType edmEntityType = null; try { edmEntityType = createEntityType(fqName); if (edmEntityType != null) { edmEntityTypes.put(fqName, edmEntityType); } } catch (EdmException e) { throw e; } catch (ODataException e) { throw new EdmException(EdmException.COMMON, e); } return edmEntityType; } EdmImpl(final EdmServiceMetadata edmServiceMetadata); @Override EdmEntityContainer getEntityContainer(final String name); @Override EdmEntityType getEntityType(final String namespaceOrAlias, final String name); @Override EdmComplexType getComplexType(final String namespaceOrAlias, final String name); @Override EdmAssociation getAssociation(final String namespaceOrAlias, final String name); @Override EdmServiceMetadata getServiceMetadata(); @Override EdmEntityContainer getDefaultEntityContainer(); @Override List<EdmEntitySet> getEntitySets(); @Override List<EdmFunctionImport> getFunctionImports();  }### Answer:
@Test public void testEntityTypeCache() throws EdmException { assertEquals(edm.getEntityType("foo", "bar"), edm.getEntityType("foo", "bar")); assertNotSame(edm.getEntityType("foo", "bar"), edm.getEntityType("bar", "foo")); }