IPlatformImportHandler mockImportHandler = mock( IPlatformImportHandler.class );
when( mockImportHandler.getMimeTypes() ).thenReturn( Collections.<MimeType>emptyList() );
List<IPlatformImportHandler> handlers = new ArrayList<IPlatformImportHandler>();
handlers.add( mockImportHandler );
MicroPlatform microPlatform = new MicroPlatform();
NameBaseMimeResolver nameResolver = new NameBaseMimeResolver();
microPlatform.defineInstance( IPlatformImportMimeResolver.class, nameResolver );
PentahoPlatformImporter importer =
new PentahoPlatformImporter( handlers, new DefaultRepositoryContentConverterHandler(
new HashMap<String, Converter>() ) );
importer.setDefaultHandler( mockImportHandler );