BytesWritable value1 = new BytesWritable("value1".getBytes());
ArrayList<BytesWritable> values = new ArrayList<BytesWritable>();
values.add(value1);
Reducer.Context context = mock(Reducer.Context.class);
Counters counters = new Counters();
Counter counter = counters.findCounter(DedupRecordCounter.OUTPUT);
when(context.getCounter(DedupRecordCounter.OUTPUT)).thenReturn(counter);
DedupKeyReducer dedupReducer = new DedupKeyReducer();
dedupReducer.reduce(hihoTuple, values, context);
verify(context).write(key, value1);
assertEquals(1, context.getCounter(DedupRecordCounter.OUTPUT)