@Test public void testUpdatedDetectorLastUsed() throws IOException { clientUnderTest.updatedDetectorLastUsed(DETECTOR_UUID); val bodyMap = buildDetectorMappingByUuidBody(DETECTOR_UUID); verify(objectMapper, times(1)).writeValueAsString(bodyMap); }
public void updatedDetectorLastUsed(UUID uuid) { val uri = String.format(baseUri + UPDATE_DETECTOR_LAST_USED_PATH); val bodyMap = Collections.singletonMap("detectorUuid", uuid); try { val body = objectMapper.writeValueAsString(bodyMap); httpClient.post(uri, body); } catch (IOException e) { val message = "IOException while updating detector's dateLastAccessed value for" + ": uuid=" + uuid + ", httpMethod=POST" + ", uri=" + uri; throw new DetectorException(message, e); } }
DetectorClient { public void updatedDetectorLastUsed(UUID uuid) { val uri = String.format(baseUri + UPDATE_DETECTOR_LAST_USED_PATH); val bodyMap = Collections.singletonMap("detectorUuid", uuid); try { val body = objectMapper.writeValueAsString(bodyMap); httpClient.post(uri, body); } catch (IOException e) { val message = "IOException while updating detector's dateLastAccessed value for" + ": uuid=" + uuid + ", httpMethod=POST" + ", uri=" + uri; throw new DetectorException(message, e); } } }
DetectorClient { public void updatedDetectorLastUsed(UUID uuid) { val uri = String.format(baseUri + UPDATE_DETECTOR_LAST_USED_PATH); val bodyMap = Collections.singletonMap("detectorUuid", uuid); try { val body = objectMapper.writeValueAsString(bodyMap); httpClient.post(uri, body); } catch (IOException e) { val message = "IOException while updating detector's dateLastAccessed value for" + ": uuid=" + uuid + ", httpMethod=POST" + ", uri=" + uri; throw new DetectorException(message, e); } }  }
DetectorClient { public void updatedDetectorLastUsed(UUID uuid) { val uri = String.format(baseUri + UPDATE_DETECTOR_LAST_USED_PATH); val bodyMap = Collections.singletonMap("detectorUuid", uuid); try { val body = objectMapper.writeValueAsString(bodyMap); httpClient.post(uri, body); } catch (IOException e) { val message = "IOException while updating detector's dateLastAccessed value for" + ": uuid=" + uuid + ", httpMethod=POST" + ", uri=" + uri; throw new DetectorException(message, e); } }  DetectorDocument findDetectorDocument(UUID uuid); List<DetectorDocument> findUpdatedDetectorDocuments(long timeInSecs); void updatedDetectorLastUsed(UUID uuid); DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList); List<DetectorMapping> findUpdatedDetectorMappings(long timeInSecs); DetectorMapping findDetectorMappingByUuid(UUID uuid); }
DetectorClient { public void updatedDetectorLastUsed(UUID uuid) { val uri = String.format(baseUri + UPDATE_DETECTOR_LAST_USED_PATH); val bodyMap = Collections.singletonMap("detectorUuid", uuid); try { val body = objectMapper.writeValueAsString(bodyMap); httpClient.post(uri, body); } catch (IOException e) { val message = "IOException while updating detector's dateLastAccessed value for" + ": uuid=" + uuid + ", httpMethod=POST" + ", uri=" + uri; throw new DetectorException(message, e); } }  DetectorDocument findDetectorDocument(UUID uuid); List<DetectorDocument> findUpdatedDetectorDocuments(long timeInSecs); void updatedDetectorLastUsed(UUID uuid); DetectorMatchResponse findMatchingDetectorMappings(List<Map<String, String>> tagsList); List<DetectorMapping> findUpdatedDetectorMappings(long timeInSecs); DetectorMapping findDetectorMappingByUuid(UUID uuid);  }