### Question:
KMLSpatialTemporalUtils { public static Date getExpireTime(String networkLinkControlExpires, String cacheControlHeader, String expiresHeader) { Date expireTime = parseDateString(networkLinkControlExpires); if (!isExpireTimeValid(expireTime)) { expireTime = getMaxAgeHeaderTime(cacheControlHeader, SystemTimeMillisSupplier.INSTANCE); if (!isExpireTimeValid(expireTime)) { expireTime = getExpiresHeaderTime(expiresHeader); if (!isExpireTimeValid(expireTime)) { expireTime = null; } } } return expireTime; } private  KMLSpatialTemporalUtils(); static GeographicBoundingBox caclulateGeographicBoundingBox(LatLonAltBox latLonAltBox); static GeographicBoundingBox calculateGeographicBoundingBox(LatLonBox latLonBox); static ScreenBoundingBox calculateScreenBoundingBox(ScreenOverlay screenOverlay, Image image, Viewer viewer,
            ToolbarManager toolbarManager); static double calculateX(Vec2 vec, double width); static double calculateY(Vec2 vec, double height); static Color convertColor(String kmlColor); static List<LatLonAlt> convertCoordinates(List<Coordinate> coordinates, AltitudeMode altitudeMode); static LatLonAlt convertLookAt(LookAt lookAt); static Date getExpireTime(String networkLinkControlExpires, String cacheControlHeader, String expiresHeader); static TimeConstraint getTimeConstraint(KMLFeature feature); static TimeExtents getTimeExtents(final Collection<KMLFeature> features); static io.opensphere.core.model.time.TimeSpan timeSpanFromTimePrimitive(TimePrimitive timePrimitive); static TimePrimitive timeSpanToTimePrimitive(io.opensphere.core.model.time.TimeSpan time); static LatLonAlt getLatLonAlt(Location loc, AltitudeMode altitudeMode);  }### Answer:
@Test public void testExpiresTime() { SimpleDateFormat kmlFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); kmlFormat.setTimeZone(TimeZone.getTimeZone("GMT")); SimpleDateFormat rfc1123Format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"); rfc1123Format.setTimeZone(TimeZone.getTimeZone("GMT")); Date expected; Date actual; expected = new Date(System.currentTimeMillis() / 1000L * 1000L + 120000L); actual = KMLSpatialTemporalUtils.getExpireTime(kmlFormat.format(expected), null, null); Assert.assertEquals(expected, actual); expected = new Date(System.currentTimeMillis() + 120000L); actual = KMLSpatialTemporalUtils.getExpireTime("blah", "max-age=120", null); long delta = Math.abs(actual.getTime() - expected.getTime()); Assert.assertTrue(delta < 100L); expected = new Date(System.currentTimeMillis() / 1000L * 1000L + 120000L); actual = KMLSpatialTemporalUtils.getExpireTime("blah", "crap", rfc1123Format.format(expected)); Assert.assertEquals(expected, actual); }