@Test
public void testSetMetricsSticky() {

  RedisFacade facade = mock(RedisFacade.class);
  SessionManager sm = mock(SessionManager.class);
  SessionConfiguration conf = new SessionConfiguration();
  when(sm.getConfiguration()).thenReturn(conf);
  MetricRegistry metrics = spy(new MetricRegistry());
  when(sm.getMetrics()).thenReturn(metrics );
  try (RedisSessionRepository rsr = new RedisSessionRepository(facade, "myapp", "localhost", ExpirationStrategy.ZRANGE, true)) {
    rsr.setSessionManager(sm);
    verify(metrics).meter("com.amadeus.session.myapp.redis.failover");
  }
}