public String microsoftTranslateToFrench(String text) {
        MicrosoftTranslator translator = new MicrosoftTranslator();
        // Change the id and secret! See http://msdn.microsoft.com/en-us/library/hh454950.aspx.
        translator.setId("dummy-id");
        translator.setSecret("dummy-secret");
        try {
            return translator.translate(text, "fr");
        } catch (Exception e) {
            return "Error while translating.";
        }
    }
@Test
    public void testMicrosoftTranslateToFrench() {
        String text = "hello";
        String expected = "salut";
        String translated = translatorExample.microsoftTranslateToFrench(text);
        // The user may not have set the id and secret. So, we have to check if we just
        // got the same text back.
        if (!translated.equals(text)) {
            assertEquals(expected, translated.toLowerCase(Locale.ROOT));
        }
    }