### Question:
CacheEntry { public final void setExpiresIn(final int expiresInSeconds) { final Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.SECOND, expiresInSeconds); this.expiresAt = calendar.getTime(); } CacheEntry(); final String getData(); final void setData(final String data); final int getHits(); final void incrementHits(); final int getMisses(); final void incrementMisses(); final boolean isExpired(final Date date); final void setExpiresIn(final int expiresInSeconds); final float getHitRate(); final float getMissRate();  }### Answer:
@Test public void testSetExpiresIn() throws Exception { CacheEntry cacheEntry = new CacheEntry(); cacheEntry.setExpiresIn(1000000); assertFalse(cacheEntry.isExpired(new Date())); cacheEntry.setExpiresIn(-100000); assertTrue(cacheEntry.isExpired(new Date())); }