    @Test
    public void reduceWhenTargetWordIsFound() throws IOException, InterruptedException {

        Text key = new Text(WordReducer.TARGET_WORD);
        Iterable<IntWritable> values = createValues(1, 1, 1);
        reducer.reduce(key, values, contextMock);

        ArgumentCaptor<IntWritable> countArgument = ArgumentCaptor.forClass(IntWritable.class);

        verify(contextMock, times(1)).write(eq(key), countArgument.capture());
        verifyNoMoreInteractions(contextMock);

        IntWritable count = countArgument.getValue();
        assertEquals(3, count.get());
    }