ShowFileController extends AbstractTemplateController { protected boolean isImageFileExtension(final BaseCommand command) { return mimeFileTypeMap.getContentType(command.getPath()).startsWith("image"); } ShowFileController(final FileTypeMap mimeFileTypeMap); void setColorer(final Colorer colorer); void setTextFileExtensionPattern(final String fileExtensionPattern); void setBinaryFileExtensionPattern(final String fileExtensionPattern); void setArchiveFileExtensionPattern(final String fileExtensionPattern);  }
@Test public void testIsImageFileExtension() throws Exception { final BaseCommand command = new BaseCommand(); command.setPath("file.gif"); assertTrue(ctrl.isImageFileExtension(command)); }