### Question:
AbstractExpiresHeaderFilter extends AbstractDispatcherCacheHeaderFilter { @Override protected String getHeaderValue() { Calendar next = Calendar.getInstance(); next.set(Calendar.HOUR_OF_DAY, expiresTime.get(Calendar.HOUR_OF_DAY)); next.set(Calendar.MINUTE, expiresTime.get(Calendar.MINUTE)); next.set(Calendar.SECOND, 0); adjustExpires(next); SimpleDateFormat dateFormat = new SimpleDateFormat(EXPIRES_FORMAT); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); return dateFormat.format(next.getTime()); }  String toString(); static final String PROP_EXPIRES_TIME; }### Answer:
@Test public void testGetHeaderValue() throws Exception { when(componentContext.getProperties()).thenReturn(properties); Calendar expected = Calendar.getInstance(); expected.set(Calendar.HOUR_OF_DAY, 2); expected.set(Calendar.MINUTE, 30); expected.set(Calendar.SECOND, 0); expected.set(Calendar.MILLISECOND, 0); filter.doActivate(componentContext); String header = filter.getHeaderValue(); Date date = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z").parse(header); Calendar actual = Calendar.getInstance(); actual.setTime(date); actual.set(Calendar.SECOND, 0); actual.set(Calendar.MILLISECOND, 0); assertTrue(DateUtils.isSameInstant(expected, actual)); }