private void writeTo(String language, Writer writer) throws IOException {
        try (InputStream stream = LanguageIdentifierTest.class
                .getResourceAsStream(language + ".test")) {
            IOUtils.copy(new InputStreamReader(stream, UTF_8), writer);
        }
    }
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