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;
    }
@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));
        }
    }