public static Long fromHeaders(final String header, final Map<String, String> response) {
        final Map<String, String> headers = new HashMap<>(response.entrySet()
                .stream()
                .map(entry -> Maps.immutableEntry(StringUtils.lowerCase(entry.getKey()), entry.getValue()))
                .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)));
        if(headers.containsKey(StringUtils.lowerCase(header))) {
            try {
                return normalizeToMilliseconds(Double.valueOf(headers.get(StringUtils.lowerCase(header))).longValue());
            }
            catch(NumberFormatException ignored) {
                // ignore
            }
        }
        return -1L;
    }
@Test
    public void testFindMillisecondsTimestamp() throws Exception {
        final Map<String, String> headers = new HashMap<>();
        headers.put("Mtime", "1530305150672"); // milliseconds
        assertEquals(1530305150672L, S3TimestampFeature.fromHeaders(
                S3TimestampFeature.METADATA_MODIFICATION_DATE, headers).longValue());
        headers.put("Mtime", "1530305150"); // seconds
        assertEquals(1530305150000L, S3TimestampFeature.fromHeaders(
                S3TimestampFeature.METADATA_MODIFICATION_DATE, headers).longValue());
    }