### Question:
EdmImpl implements Edm { @Override public EdmComplexType getComplexType(final String namespaceOrAlias, final String name) throws EdmException { String finalNamespace = getNamespaceForAlias(namespaceOrAlias); FullQualifiedName fqName = new FullQualifiedName(finalNamespace, name); if (edmComplexTypes.containsKey(fqName)) { return edmComplexTypes.get(fqName); } EdmComplexType edmComplexType = null; try { edmComplexType = createComplexType(fqName); if (edmComplexType != null) { edmComplexTypes.put(fqName, edmComplexType); } } catch (EdmException e) { throw e; } catch (ODataException e) { throw new EdmException(EdmException.COMMON, e); } return edmComplexType; } 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 testComplexTypeCache() throws EdmException { assertEquals(edm.getComplexType("foo", "bar"), edm.getComplexType("foo", "bar")); assertNotSame(edm.getComplexType("foo", "bar"), edm.getComplexType("bar", "foo")); }