DLOpenerOneDriveMimeTypes { public static String getOffice365MimeType(String mimeType) { if (!isOffice365MimeTypeSupported(mimeType)) { throw new UnsupportedOperationException( "Office 365 does not support edition of documents of type " + mimeType); } return mimeType; }  static String getMimeTypeExtension(String mimeType); static String getOffice365MimeType(String mimeType); static boolean isOffice365MimeTypeSupported(String mimeType);  }
@Test public void testGetOffice365MimeType() { Assert.assertEquals( DLOpenerMimeTypes.APPLICATION_VND_DOCX, DLOpenerOneDriveMimeTypes.getOffice365MimeType( DLOpenerMimeTypes.APPLICATION_VND_DOCX)); Assert.assertEquals( DLOpenerMimeTypes.APPLICATION_VND_PPTX, DLOpenerOneDriveMimeTypes.getOffice365MimeType( DLOpenerMimeTypes.APPLICATION_VND_PPTX)); Assert.assertEquals( DLOpenerMimeTypes.APPLICATION_VND_XLSX, DLOpenerOneDriveMimeTypes.getOffice365MimeType( DLOpenerMimeTypes.APPLICATION_VND_XLSX)); }