### Question:
QueryResponse implements EntryExpiration { @Override public boolean isExpired() { return expiration.before(new Date()); }  @Override boolean isExpired();  }### Answer:
@Test public void testIsExpired() { final Calendar c = Calendar.getInstance(); final Date now = c.getTime(); c.add(Calendar.MINUTE, -1); final Date before = c.getTime(); c.add(Calendar.MINUTE, 2); final Date after = c.getTime(); assertTrue(new QueryResponse("domain", "user", now, before, QueryResponse.Source.ZOWE).isExpired()); assertFalse(new QueryResponse("domain", "user", now, after, QueryResponse.Source.ZOWE).isExpired()); }