@Test
public void testDeleteExpired() {

  when(repository.getSessionData("1")).thenReturn(null);
  sessionManager.delete("1", true);
  verify(repository).getSessionData("1");
  verify(factory, never()).build(any(SessionData.class));
  assertEquals(0, metrics.meter(MetricRegistry.name(SessionManager.SESSIONS_METRIC_PREFIX, "deleted")).getCount());
}