MorphiaEntityResolver implements EntityResolver { @Override public String resolve(Class<?> entityClass) { return mapper.getMappedClass(entityClass).getCollectionName(); } MorphiaEntityResolver();  MorphiaEntityResolver(Mapper mapper); @Override String resolve(Class<?> entityClass);  }
@Test public void resolve_collectionName() { assertEquals("testclass", resolver.resolve(TestMappedClass.class)); }
@Test public void resolve_collectionName_unnamed() { assertEquals("UnnamedMappedClass", resolver.resolve(UnnamedMappedClass.class)); }