### Question:
ImageExploratoryResource { @GET public Response getImages(@Auth UserInfo ui, @QueryParam("docker_image") String dockerImage, @QueryParam("project") String project, @QueryParam("endpoint") String endpoint) { log.debug("Getting images for user {}, project {}", ui.getName(), project); final List<ImageInfoRecord> images = imageExploratoryService.getNotFailedImages(ui.getName(), dockerImage, project, endpoint); return Response.ok(images).build(); } @Inject  ImageExploratoryResource(ImageExploratoryService imageExploratoryService, RequestId requestId); @POST Response createImage(@Auth UserInfo ui,
								@Valid @NotNull ExploratoryImageCreateFormDTO formDTO,
								@Context UriInfo uriInfo); @GET Response getImages(@Auth UserInfo ui,
							  @QueryParam("docker_image") String dockerImage,
							  @QueryParam("project") String project,
							  @QueryParam("endpoint") String endpoint); @GET @Path("all") Response getAllImagesForProject(@Auth UserInfo ui, @NotNull @QueryParam("project") String project); @GET @Path("{name}") Response getImage(@Auth UserInfo ui,
							 @PathParam("name") String name,
							 @QueryParam("project") String project,
							 @QueryParam("endpoint") String endpoint);  }### Answer:
@Test public void getImages() { when(imageExploratoryService.getNotFailedImages(anyString(), anyString(), anyString(), anyString())) .thenReturn(getImageList()); final Response response = resources.getJerseyTest() .target("/infrastructure_provision/exploratory_environment/image") .queryParam("docker_image", "someDockerImage") .queryParam("project", "someProject") .queryParam("endpoint", "someEndpoint") .request() .header("Authorization", "Bearer " + TOKEN) .get(); assertEquals(HttpStatus.SC_OK, response.getStatus()); assertEquals(getImageList(), response.readEntity(new GenericType<List<ImageInfoRecord>>() { })); assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE)); verify(imageExploratoryService).getNotFailedImages(USER.toLowerCase(), "someDockerImage", "someProject", "someEndpoint"); verifyNoMoreInteractions(imageExploratoryService); }