class DetectorClient {

    public DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList) {
        isTrue(tagsList.size() > 0, "tagsList must not be empty");

        val uri = baseUri + FIND_MAPPINGS_BY_TAGS_PATH;
        Content content;
        try {
            String body = objectMapper.writeValueAsString(tagsList);
            content = httpClient.post(uri, body);
        } catch (IOException e) {
            val message = "IOException while getting matching detectors for" +
                    ": tags=" + tagsList +
                    ", httpMethod=POST" +
                    ", uri=" + uri;
            throw new DetectorException(message, e);
        }
        try {
            return objectMapper.readValue(content.asBytes(), DetectorMatchResponse.class);
        } catch (IOException e) {
            val message = "IOException while reading detectorMatchResponse: tags=" + tagsList;
            throw new DetectorException(message, e);
        }
    }

}