### Question:
HeatCacheEntry implements Serializable { public boolean isExpired() { if (expires == null) { return true; } return System.currentTimeMillis() > expires.getTimeInMillis(); } HeatCacheEntry(String heatUrl, String token, Calendar expires); Heat getHeatClient(); boolean isExpired();  }### Answer:
@Test public void isExpiredTrueTest() { Calendar expires = new GregorianCalendar(2013, 0, 31); HeatCacheEntry heatCacheEntry = new HeatCacheEntry(HEAT_URL, TOKEN, expires); assertTrue(heatCacheEntry.isExpired()); }
@Test public void isExpiredFalseTest() { Calendar expires = new GregorianCalendar(2100, 0, 31); HeatCacheEntry heatCacheEntry = new HeatCacheEntry(HEAT_URL, TOKEN, expires); assertFalse(heatCacheEntry.isExpired()); }
@Test public void isExpiredNullTest() { Calendar expires = null; HeatCacheEntry heatCacheEntry = new HeatCacheEntry(HEAT_URL, TOKEN, expires); assertTrue(heatCacheEntry.isExpired()); }