private void countValid(String [] strings, int numReps, String text, Function<String, Boolean> func) {
        long start = System.nanoTime();
        int validCount = 0;
        for (int i = 0; i < numReps; i++) {
            for (String s : strings) {
                if ( ! func.apply(s)) validCount++;
            }
        }
        long end = System.nanoTime();
        assertEquals(strings.length * numReps, validCount);
        System.out.println("Identifier " + text + " validity check took " + (end - start)/1000000 + "ms");
    }
Tests rank feature names.

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