@Test
    public void testLongestSequenceRatio() {
        assertMetrics("longestSequenceRatio:1",  "a","a");
        assertMetrics("longestSequenceRatio:0",  "a","x");
        assertMetrics("longestSequenceRatio:1",  "a a","a");
        assertMetrics("longestSequenceRatio:1",  "a","a a");
        assertMetrics("longestSequenceRatio:1",  "a b","a b");
        assertMetrics("longestSequenceRatio:1",  "a y"," a x");
        assertMetrics("longestSequenceRatio:0.5","a b","a x b");
        assertMetrics("longestSequenceRatio:0.75","a b c d","x x a b x a x c d a b c x d x");
    }
Tests of calculation of all the string match metrics.
Add true as the fourth parameter to assertMetrics to see a trace of what the test is doing.

@author bratseth
searchlib/src/test/java/com/yahoo/searchlib/ranking/features/fieldmatch/test/FieldMatchMetricsTestCase.java