MergeReducer extends Reducer<Text, NullWritable, Text, Text> { boolean valid(String x, String y, String z) { return newHashSet(x.toLowerCase(), y.toLowerCase(), z.toLowerCase()).size() == 3; }  @Override void reduce(Text key, Iterable<NullWritable> values, Context context); static final String INSERT_INTO_CAPSTONE_FLIGHTCONNECTIONS_X_Y_Z_X_DEP_DATE_Y_DEP_DATE_XYFLIGHTNR_YZFLIGHTNR_VALUES; static Logger log; }
@Test public void checkRoute(){ MergeReducer reducer = new MergeReducer(); assertTrue(reducer.valid("NYC", "WRO", "WAW")); assertFalse(reducer.valid("WAW", "WRO", "WAW")); assertFalse(reducer.valid("WRO", "WRO", "WAW")); }