@Test
public void shouldExtractAddHeadersForAllMatchGroups() throws Exception {

  Context context = new Context();
  context.put(RegexExtractorInterceptor.REGEX, "(\\d):(\\d):(\\d)");
  context.put(RegexExtractorInterceptor.SERIALIZERS, "s1 s2 s3");
  context.put(RegexExtractorInterceptor.SERIALIZERS + ".s1.name", "Num1");
  context.put(RegexExtractorInterceptor.SERIALIZERS + ".s2.name", "Num2");
  context.put(RegexExtractorInterceptor.SERIALIZERS + ".s3.name", "Num3");
  fixtureBuilder.configure(context);
  Interceptor fixture = fixtureBuilder.build();
  Event event = EventBuilder.withBody("1:2:3.4foobar5", Charsets.UTF_8);
  Event expected = EventBuilder.withBody("1:2:3.4foobar5", Charsets.UTF_8);
  expected.getHeaders().put("Num1", "1");
  expected.getHeaders().put("Num2", "2");
  expected.getHeaders().put("Num3", "3");
  Event actual = fixture.intercept(event);
  Assert.assertArrayEquals(expected.getBody(), actual.getBody());
  Assert.assertEquals(expected.getHeaders(), actual.getHeaders());
}