@Test
public void testGetImage() throws IOException {

    ElasticSearchImageService spyService = _initializeSpyService(elasticSearchImageService, getReply, getReply);
    byte[] expectedBytes = "Test string".getBytes();
    byte[] actualBytes = spyService.getImage("0FD3DBEC9730101BFF92ACC820BEFC34");
    assertArrayEquals(expectedBytes, actualBytes);
    ArgumentCaptor<Request> requestCaptor = ArgumentCaptor.forClass(Request.class);
    verify(restClient, times(1)).performRequest(requestCaptor.capture());
    Request capturedRequest = requestCaptor.getValue();
    String queryJson = convertToPrettyJson(EntityUtils.toString(capturedRequest.getEntity()));
    assertEquals(imageIdQuery, queryJson);
    String expectedURL = "/argus-image-*/_search";
    assertEquals(expectedURL, capturedRequest.getEndpoint());
}