NameBaseMimeResolver implements IPlatformMimeResolver { @Override public String resolveMimeForFileName( String fileName ) { IMimeType mimeType = extensionToMimeMap.get( extractExtension( fileName ) ); if ( mimeType == null ) { return null; } return mimeType.getName(); } NameBaseMimeResolver(); @Override String resolveMimeForFileName( String fileName ); @Override String resolveMimeForBundle( IPlatformImportBundle bundle ); @Override IMimeType resolveMimeTypeForFileName( String fileName ); @Override void addMimeType( IMimeType mimeType );  }
@Test public void testResolveMimeForFileName() { String actualMime = resolver.resolveMimeForFileName( "testFile.tmt" ); assertEquals( actualMime, "test/test-mime" ); }