### Question:
KMLSpatialTemporalUtils { static Date getMaxAgeHeaderTime(String cacheControlHeader, LongSupplier currentTimeSupplier) { Date maxAge = null; if (!StringUtils.isBlank(cacheControlHeader)) { String[] pairs = cacheControlHeader.split(","); for (String pair : pairs) { String[] toks = pair.split("="); String key = toks[0].trim(); String value = toks.length >= 2 ? toks[1].trim() : null; if ("max-age".equals(key)) { int maxAgeSeconds; try { maxAgeSeconds = Integer.parseInt(value); } catch (NumberFormatException e) { maxAgeSeconds = 0; } if (maxAgeSeconds > 0) { maxAge = new Date(currentTimeSupplier.get() + (long)maxAgeSeconds * 1000); } } } } return maxAge; } 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 testMaxAgeHeaderTime() { final long now = System.currentTimeMillis(); Date expected = new Date(now + 120000L); LongSupplier nowSupplier = new LongSupplier() { @Override public long get() { return now; } }; Date actual = KMLSpatialTemporalUtils.getMaxAgeHeaderTime("blah, max-age=120, foo", nowSupplier); Assert.assertEquals(actual, expected); Assert.assertNull(KMLSpatialTemporalUtils.getMaxAgeHeaderTime("blah, max-age=0, foo", nowSupplier)); Assert.assertNull(KMLSpatialTemporalUtils.getMaxAgeHeaderTime("blah, max-age=, foo", nowSupplier)); Assert.assertNull(KMLSpatialTemporalUtils.getMaxAgeHeaderTime("blah, foo", nowSupplier)); Assert.assertNull(KMLSpatialTemporalUtils.getMaxAgeHeaderTime(null, nowSupplier)); }