@Test
public void shouldExtractAddHeadersForAllMatchGroupsIgnoringMissingIds()
    throws Exception {

  String body = "2012-10-17 14:34:44,338";
  Context context = new Context();
  // Skip the second group
  context.put(RegexExtractorInterceptor.REGEX,
      "^(\\d\\d\\d\\d-\\d\\d-\\d\\d\\s\\d\\d:\\d\\d)(:\\d\\d,\\d\\d\\d)");
  context.put(RegexExtractorInterceptor.SERIALIZERS, "s1");
  context
      .put(RegexExtractorInterceptor.SERIALIZERS + ".s1.name", "timestamp");
  fixtureBuilder.configure(context);
  Interceptor fixture = fixtureBuilder.build();
  Event event = EventBuilder.withBody(body, Charsets.UTF_8);
  Event expected = EventBuilder.withBody(body, Charsets.UTF_8);
  expected.getHeaders().put("timestamp", "2012-10-17 14:34");
  Event actual = fixture.intercept(event);
  Assert.assertArrayEquals(expected.getBody(), actual.getBody());
  Assert.assertEquals(expected.getHeaders(), actual.getHeaders());
}