public void assertSegmented(Language language, String input, String... expectedSegments) {
        List<String> segments = ((Segmenter)embedder).segment(input, language);
        assertArrayEquals("Actual segments: " + segments,
                          expectedSegments, ((Segmenter)embedder).segment(input, language).toArray());
    }
Tests both embedding to a list of id's and encoding the same ids to a vector of the given type.

@param expectedCodes all the expected codes of the given input, not including any trailing 0-paddings
                     required for the tensor only
linguistics-components/src/test/java/com/yahoo/language/tools/EmbedderTester.java