@Test
public void testStatsLogging() throws InstantiationException, IllegalAccessException {

  DeserializerProcessor deser = new DeserializerProcessor(new DummyDeserializer());
  /*
   * Mock the Stat object
   */
  Stat runtimeStat = mock(Stat.class);
  Stat successStat = mock(Stat.class);
  Stat errorStat = mock(Stat.class);
  deser.setRuntimeStat(runtimeStat);
  deser.setSuccessCountStat(successStat);
  deser.setErrorCountStat(errorStat);
  deser.deserialize("foo");
  /*
   * Verify start, stop, increment success count, and never increment error count.
   */
  verify(runtimeStat, times(1)).start();
  verify(runtimeStat, times(1)).stop();
  verify(successStat, times(1)).increment();
  verify(errorStat, never()).increment();
}