DimExtractionFn dimExtractionFn = new SearchQuerySpecDimExtractionFn(spec);
List<String> expected = Arrays.asList("Kyoto", "Tokyo", "Toyokawa", "Yorktown");
Set<String> extracted = Sets.newHashSet();
for (String str : testStrings) {
String res = dimExtractionFn.apply(str);
if (res != null) {
extracted.add(res);
}
}