@Test
    public void testSimpleTranslate() throws Exception {
        assumeTrue(translator.isAvailable());
        String source = "hello";
        String expected = "salut";
        String translated = translator.translate(source, "en", "fr");
        assertTrue(expected.equalsIgnoreCase(translated),
                "Translate " + source + " to " + expected + " (was " + translated + ")");
    }
Test cases for the {@link MicrosoftTranslator} class.
tika-translate/src/test/java/org/apache/tika/language/translate/impl/MicrosoftTranslatorTest.java