  @Test
  public void testInterceptor() throws Exception {

    LifecycleHelper.init(metricsInterceptor);
    LifecycleHelper.start(metricsInterceptor);
    AdaptrisMessage message = createMessage();

    assertEquals(0, metricsInterceptor.getStats().size());
    submitMessage(message);
    // Make sure there is 1 message in the cache
    assertEquals(1, metricsInterceptor.getStats().size());
    assertEquals(10, ((MetadataStatistic) metricsInterceptor.getStats().get(0)).getValue(COUNTER_1));
    assertEquals(10, ((MetadataStatistic) metricsInterceptor.getStats().get(0)).getValue(COUNTER_2));
    assertEquals(0, ((MetadataStatistic) metricsInterceptor.getStats().get(0)).getValue(this.getClass().getSimpleName()));
    assertEquals(0, ((MetadataStatistic) metricsInterceptor.getStats().get(0)).getValue("blah"));
  }