FieldFromTuple implements Extractor<Tuple, OUT> { @Override public OUT extract(Tuple in) { return in.getField(fieldId); } FieldFromTuple();  FieldFromTuple(int fieldId); @Override OUT extract(Tuple in);  }
@Test public void testSingleFieldExtraction() throws InstantiationException, IllegalAccessException { for (int i = 0; i < Tuple.MAX_ARITY; i++) { Tuple current = (Tuple) CLASSES[i].newInstance(); for (int j = 0; j < i; j++) { current.setField(testStrings[j], j); } for (int j = 0; j < i; j++) { assertEquals(testStrings[j], new FieldFromTuple<String>(j).extract(current)); } } }