### Question:
DefaultOfficeViewerScriptService implements OfficeViewerScriptService { @Override public boolean isMimeTypeSupported(String mimeType) { return isConversionSupported(mimeType, "text/html"); }  @Override Exception getCaughtException(); @Override String view(AttachmentReference attachmentReference); @Override String view(AttachmentReference attachmentReference, Map<String, String> parameters); @Override boolean isMimeTypeSupported(String mimeType);  }### Answer:
@Test public void isMimeTypeSupported() throws Exception { OfficeServer officeServer = mocker.getInstance(OfficeServer.class); OfficeConverter officeConverter = mock(OfficeConverter.class); when(officeServer.getConverter()).thenReturn(officeConverter); when(officeConverter.getFormatRegistry()).thenReturn(DefaultDocumentFormatRegistry.getInstance()); for (String mediaType : Arrays.asList("application/vnd.oasis.opendocument.text", "application/msword", "application/vnd.oasis.opendocument.presentation", "application/vnd.ms-powerpoint", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.ms-excel")) { Assert.assertTrue(mocker.getComponentUnderTest().isMimeTypeSupported(mediaType)); } for (String mediaType : Arrays.asList("foo/bar", "application/pdf")) { Assert.assertFalse(mocker.getComponentUnderTest().isMimeTypeSupported(mediaType)); } }