class DetectorClient {

    public List<DetectorMapping> findUpdatedDetectorMappings(long timeInSecs) {
        Content content;
        List<DetectorMapping> result;

        val uri = String.format(baseUri + FIND_UPDATED_MAPPINGS_PATH, timeInSecs);
        try {
            content = httpClient.get(uri);
        } catch (IOException e) {
            val message = "IOException while getting updated detectors mappings" +
                    ": timeInSecs=" + timeInSecs +
                    ", httpMethod=GET" +
                    ", uri=" + uri;
            throw new DetectorException(message, e);
        }

        val typeRef = new TypeReference<List<DetectorMapping>>() {
        };
        try {
            result = objectMapper.readValue(content.asBytes(), typeRef);
        } catch (IOException e) {
            val message = "IOException while reading updated detectors mappings" +
                    ": timeInSecs=" + timeInSecs;
            throw new DetectorException(message, e);
        }

        if (result == null) {
            throw new DetectorException("Updated detector mappings are null");
        }

        return result;
    }

}