@Test
public void testPreserve() throws ClassNotFoundException,
    InstantiationException, IllegalAccessException {

  Interceptor.Builder builder = InterceptorBuilderFactory.newInstance(
      InterceptorType.STATIC.toString());
  Context ctx = new Context();
  ctx.put(Constants.PRESERVE, "true");
  ctx.put(Constants.VALUE, "replacement value");
  builder.configure(ctx);
  Interceptor interceptor = builder.build();
  Event event = EventBuilder.withBody("test", Charsets.UTF_8);
  event.getHeaders().put(Constants.KEY, "incumbent value");
  Assert.assertNotNull(event.getHeaders().get(Constants.KEY));
  event = interceptor.intercept(event);
  String val = event.getHeaders().get(Constants.KEY);
  Assert.assertNotNull(val);
  Assert.assertEquals("incumbent value", val);
}