@Test
public void testInvalidationConflict() {

  assertEquals(0,
      metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "invalidation", "errors")).getCount());
  assertEquals(0,
      metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "invalidation", "errors", "expiry"))
          .getCount());
  RepositoryBackedSession session = mock(RepositoryBackedSession.class);
  sessionManager.invalidationConflict(session, true);
  assertEquals(0,
      metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "invalidation", "errors")).getCount());
  assertEquals(1,
      metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "invalidation", "errors", "expiry"))
          .getCount());
  sessionManager.invalidationConflict(session, false);
  assertEquals(1,
      metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "invalidation", "errors")).getCount());
  assertEquals(1,
      metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "invalidation", "errors", "expiry"))
          .getCount());
}