@Test
    public void testRelatedness() {
        assertMetrics("relatedness:1",  "a","a");
        assertMetrics("relatedness:0",  "a","x");
        assertMetrics("relatedness:1",  "a b","a b");
        assertMetrics("relatedness:1",  "a b c","a b c");
        assertMetrics("relatedness:0.5","a b c","a b x x x x x x x x x x x x x x x x x x x x x x x c");
        assertMetrics("relatedness:0.5","a y b y y y c","a b x x x x x x x x x x x x x x x x x x x x x x x c");
    }
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