DefaultTypeMappingContext implements TypeMappingContext { @Override public List<Class<?>> getImplementations(Class<?> repositoryType) { final List<Class<?>> classes = new LinkedList<>(); for (Class<?> repositorySuperType : mappings.keySet()) { if (repositorySuperType.isAssignableFrom(repositoryType)) { classes.addAll(mappings.get(repositorySuperType)); } } classes.sort(AnnotationAwareOrderComparator.INSTANCE); if (parent != null) { classes.addAll(parent.getImplementations(repositoryType)); } return classes; } DefaultTypeMappingContext();  DefaultTypeMappingContext(boolean registerDefaults);  DefaultTypeMappingContext(TypeMappingContext parent); @Override void register(Class<?> repositoryType, Class<?> implementation); @Override List<Class<?>> getImplementations(Class<?> repositoryType); @Override List<TypeMapping<?>> getMappings(Class<?> repositoryType);  }
@Test public void testDefaultMappings() { final DefaultTypeMappingContext context = new DefaultTypeMappingContext(); assertThat(context.getImplementations(Object.class), Matchers.<Class<?>>containsInAnyOrder(defaultImplementations)); }