test_class.declarator: contextMock
test_class.modifier: private
test_class.original_string: private Mapper.Context contextMock;
test_class.type: Mapper.Context
test_class.var_name: contextMock
test_class.declarator: mapper
test_class.modifier: private
test_class.original_string: private WordMapper mapper;
test_class.type: WordMapper
test_class.var_name: mapper
test_class.file: mapreduce/src/test/java/net/petrikainulainen/spring/data/apachehadoop/WordMapperTest.java
test_class.identifier: WordMapperTest
test_case.body: @Test
      public void mapWithDot() throws IOException, InterruptedException {
          LongWritable key = new LongWritable(1);
  
          mapper.map(key, new Text("I."), contextMock);
  
          ArgumentCaptor<Text> keyArgument = ArgumentCaptor.forClass(Text.class);
          ArgumentCaptor<IntWritable> valueArgument = ArgumentCaptor.forClass(IntWritable.class);
  
          verify(contextMock, times(1)).write(keyArgument.capture(), valueArgument.capture());
          assertEquals("I", keyArgument.getValue().toString());
          assertEquals(1, valueArgument.getValue().get());
  
          verifyNoMoreInteractions(contextMock);
      }
test_case.class_method_signature: WordMapperTest.mapWithDot()
test_case.full_signature: @Test public void mapWithDot()
test_case.identifier: mapWithDot
test_case.invocations: map forClass forClass write verify times capture capture assertEquals toString getValue assertEquals get getValue verifyNoMoreInteractions
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void mapWithDot()
focal_class.declarator: word = new Text()
focal_class.modifier: private
focal_class.original_string: private Text word = new Text();
focal_class.type: Text
focal_class.var_name: word
focal_class.file: mapreduce/src/main/java/net/petrikainulainen/spring/data/apachehadoop/WordMapper.java
focal_class.identifier: WordMapper
focal_class.class_method_signature: WordMapper.map(LongWritable key, Text value, Context context)
focal_class.full_signature: @Override protected void map(LongWritable key, Text value, Context context)
focal_class.identifier: map
focal_class.modifiers: @Override protected
focal_class.parameters: (LongWritable key, Text value, Context context)
focal_class.return: void
focal_class.signature: void map(LongWritable key, Text value, Context context)
focal_class.class_method_signature: WordMapper.removeNonLettersOrNumbers(String original)
focal_class.full_signature: private String removeNonLettersOrNumbers(String original)
focal_class.identifier: removeNonLettersOrNumbers
focal_class.modifiers: private
focal_class.parameters: (String original)
focal_class.return: String
focal_class.signature: String removeNonLettersOrNumbers(String original)
focal_class.superclass: extends Mapper<LongWritable, Text, Text, IntWritable>
focal_method.body: @Override
      protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
          String line = value.toString();
          StringTokenizer lineTokenizer = new StringTokenizer(line);
          while (lineTokenizer.hasMoreTokens()) {
              String cleaned = removeNonLettersOrNumbers(lineTokenizer.nextToken());
              word.set(cleaned);
              context.write(word, new IntWritable(1));
          }
      }
focal_method.class_method_signature: WordMapper.map(LongWritable key, Text value, Context context)
focal_method.full_signature: @Override protected void map(LongWritable key, Text value, Context context)
focal_method.identifier: map
focal_method.invocations: toString hasMoreTokens removeNonLettersOrNumbers nextToken set write
focal_method.modifiers: @Override protected
focal_method.parameters: (LongWritable key, Text value, Context context)
focal_method.return: void
focal_method.signature: void map(LongWritable key, Text value, Context context)