@Test
public void testHasExpired_SimulatingExpiration() throws Exception {

    TimeExpirable.Now now = mock(TimeExpirable.Now.class);
    long time = System.currentTimeMillis();
    when(now.now()).thenReturn(time);
    TimeExpirable expirable = new TimeExpirable(1, now);
    when(now.now()).thenReturn(time + MIN_IN_MS);
    assertThat(expirable.isExpired()).describedAs("Exactly at expiration interval").isTrue();
}