GCloudNaturalLanguageUtil { public static String getType(String mimeType) { if (ContentTypes.TEXT_HTML.equals(mimeType)) { return "HTML"; } return "PLAIN_TEXT"; }  static String getDocumentPayload(String content, String type); static String getType(String mimeType); static String truncateToSize(String content, int size);  }
@Test public void testGetTypeWithMSWord() { Assert.assertEquals( "PLAIN_TEXT", GCloudNaturalLanguageUtil.getType(ContentTypes.APPLICATION_MSWORD)); }
@Test public void testGetTypeWithTextPlain() { Assert.assertEquals( "PLAIN_TEXT", GCloudNaturalLanguageUtil.getType(ContentTypes.TEXT_PLAIN)); }
@Test public void testGetTypeWitHTML() { Assert.assertEquals( "HTML", GCloudNaturalLanguageUtil.getType(ContentTypes.TEXT_HTML)); }