@Test
    public void testMatches() {
        assertMetrics("matches:1 queryCompleteness:1   fieldCompleteness:1",   "a","a");
        assertMetrics("matches:3 queryCompleteness:1   fieldCompleteness:1",   "a b c","a b c");
        assertMetrics("matches:3 queryCompleteness:1   fieldCompleteness:0.5", "a b c","a b c a b d");
        assertMetrics("matches:3 queryCompleteness:0.5 fieldCompleteness:0.25","a y y b c y","a x x b c x a x a b x 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