@Test
public void testExtraction()
{
String regex = ".*[Tt][Oo].*";
DimExtractionFn dimExtractionFn = new PartialDimExtractionFn(regex);
List<String> expected = Arrays.asList("Quito", "Tokyo", "Stockholm", "Pretoria", "Wellington");
Set<String> extracted = Sets.newHashSet();
for (String str : testStrings) {
String res = dimExtractionFn.apply(str);
if (res != null) {
extracted.add(res);
}
}