### Question:
S3Authentication { static void assertDateNotSkewed(final Date date) throws RequestTimeTooSkewedException { DateTime currentTime = DateTime.now(); DateTime dt = new DateTime(date); if (dt.isBefore(currentTime.minusMillis((int) ObjectStorageProperties.EXPIRATION_LIMIT))) throw new RequestTimeTooSkewedException(); if (dt.isAfter(currentTime.plusMillis((int) ObjectStorageProperties.EXPIRATION_LIMIT))) throw new RequestTimeTooSkewedException(); } private  S3Authentication(); static void authenticateV4Streaming(MappingHttpRequest request, List<AwsChunk> chunks);  }### Answer:
@Test(expected = RequestTimeTooSkewedException.class) public void testAssertDateNotSkewedForPastDate() throws Throwable { S3Authentication.assertDateNotSkewed(DateTime.now().minusMinutes(17).toDate()); fail("Date should have been expired"); }
@Test(expected = RequestTimeTooSkewedException.class) public void testAssertDateNotSkewedForFutureDate() throws Throwable { S3Authentication.assertDateNotSkewed(DateTime.now().plusMinutes(17).toDate()); fail("Date should have been expired"); }