@Ignore("Remove until difference in time on build machine is figured out.")
@Test
public void testAnonymousAuthenticationToken() {

    final DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss");
    final DateTime now = formatter.parseDateTime("1985-10-26 01:24:00").withZone(DateTimeZone.UTC);
    final Date expiry = new Date(1_000_000_000L);
    Mockito.when(mockDateTimeService.now()).thenReturn(now);
    Mockito.when(mockDateTimeService.plusDaysAsDate(now, 1)).thenReturn(expiry);
    final String response = defaultAuthenticationService.anonymousToken();
    Assert.assertEquals(
        "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhbm9ueW1vdXMiLCJpYXQiOjQ5OTE2NjY0MCwiZXhwIjoxMDAwMDAwfQ.c-kEHbZBxg4sTiweFgQrHtMJSSwiaavqHRsWhw0Uvwc",
        response);
    Mockito.verify(mockDateTimeService).now();
    Mockito.verify(mockDateTimeService).plusDaysAsDate(now, 1);
}