@Test
    public void testMixedLanguages() throws IOException {
        for (String language : languages) {
            for (String other : languages) {
                if (!language.equals(other)) {
                    if (language.equals("lt") || other.equals("lt")) {
                        continue;
                    }
                    ProfilingWriter writer = new ProfilingWriter();
                    writeTo(language, writer);
                    writeTo(other, writer);
                    LanguageIdentifier identifier = null;
                    identifier = new LanguageIdentifier(writer.getProfile());
                    assertFalse(identifier.isReasonablyCertain(),
                            "mix of " + language + " and " + other + " incorrectly detected as " +
                                    identifier);
                }
            }
        }
    }
JUnit based test of class {@link LanguageIdentifier}.

@author Sami Siren
@author Jerome Charron - http://frutch.free.fr/
tika-langdetect/tika-langdetect-tika/src/test/java/org/apache/tika/langdetect/tika/LanguageIdentifierTest.java