@Test
    public void testAllLanguages() throws IOException {
        LanguageDetector detector = new OptimaizeLangDetector();
        detector.loadModels();

        LanguageWriter writer = new LanguageWriter(detector);

        for (String language : getTestLanguages()) {
            writer.reset();

            writeTo(language, writer);

            LanguageResult result = detector.detect();
            assertNotNull(result);

            assertTrue(result.isLanguage(language));
            assertTrue(result.isReasonablyCertain());
        }
    }
Test correct detection for the many (short) translations of the
"Universal Declaration of Human Rights (Article 1)", at
http://www.omniglot.com/udhr
<p>
Also make sure we get uncertain results for some set of unsupported
languages.

@throws Exception
tika-langdetect/tika-langdetect-optimaize/src/test/java/org/apache/tika/langdetect/optimaize/OptimaizeLangDetectorTest.java