### Question:
TileSourcePolicy { public Long getHttpCacheControlDuration(final String pHttpCacheControlHeader) { if (pHttpCacheControlHeader != null && pHttpCacheControlHeader.length() > 0) { try { final String[] parts = pHttpCacheControlHeader.split(", "); final String maxAge = "max-age="; for (final String part : parts) { final int pos = part.indexOf(maxAge); if (pos == 0) { final String durationString = part.substring(maxAge.length()); return Long.valueOf(durationString); } } } catch (final Exception ex) { if (Configuration.getInstance().isDebugMapTileDownloader()) Log.d(IMapView.LOGTAG, "Unable to parse cache control tag for tile, server returned " + pHttpCacheControlHeader, ex); } } return null; } TileSourcePolicy();  TileSourcePolicy(final int pMaxConcurrent,
                            final int pFlags); int getMaxConcurrent(); boolean acceptsBulkDownload(); boolean normalizesUserAgent(); boolean acceptsPreventive(); boolean acceptsUserAgent(final String pUserAgent); Long getHttpExpiresTime(final String pHttpExpiresHeader); Long getHttpCacheControlDuration(final String pHttpCacheControlHeader); long computeExpirationTime(final String pHttpExpiresHeader, final String pHttpCacheControlHeader, final long pNow); long computeExpirationTime(final HttpURLConnection pHttpURLConnection, final long pNow); static final int FLAG_NO_BULK; static final int FLAG_NO_PREVENTIVE; static final int FLAG_USER_AGENT_MEANINGFUL; static final int FLAG_USER_AGENT_NORMALIZED; }### Answer:
@Test public void testGetHttpCacheControlDuration(){ final TileSourcePolicy tileSourcePolicy = new TileSourcePolicy(); for (final String string : mCacheControlStringOK) { Assert.assertEquals(mCacheControlValue, (long) tileSourcePolicy.getHttpCacheControlDuration(string)); } for (final String string : mCacheControlStringKO) { Assert.assertNull(tileSourcePolicy.getHttpCacheControlDuration(string)); } }