### Question:
DefaultModelIndex implements ModelIndex { @Override public Map<String, ClassType> getClassTypes() { return classTypesByName; } DefaultModelIndex(final Model model); @Override List<AssociationEnd> getAssociationEnds(final Identifier type); @Override Map<String, ClassType> getClassTypes(); @Override String getNamespaceURI(final Type type); @Override Map<QName, DataType> getDataTypes(); @Override Iterable<EnumType> getEnumTypes(); @Override List<Generalization> getGeneralizationBase(final Identifier derived); @Override List<Generalization> getGeneralizationDerived(final Identifier base); @Override TagDefinition getTagDefinition(final Identifier reference); @Override Type getType(final Identifier reference); @Override Set<ModelElement> whereUsed(final Identifier id); @Override TagDefinition getTagDefinition(final QName name); @Override Set<ModelElement> lookupByName(final QName name); @Override void lookup(final Identifier id, final Visitor visitor);  }### Answer:
@Test public void testGetClassTypes() { assertEquals(1, modelIndex.getClassTypes().size()); assertTrue(modelIndex.getClassTypes().containsKey(CLASSTYPE_NAME)); }