### Question:
ImageExploratoryResource { @GET @Path("all") public Response getAllImagesForProject(@Auth UserInfo ui, @NotNull @QueryParam("project") String project) { log.debug("Getting images for user {}, project {}", ui.getName(), project); final List<ImageInfoRecord> images = imageExploratoryService.getImagesForProject(project); 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 getAllImagesForProject() { when(imageExploratoryService.getImagesForProject(anyString())).thenReturn(getImageList()); final Response response = resources.getJerseyTest() .target("/infrastructure_provision/exploratory_environment/image/all") .queryParam("project", "someProject") .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).getImagesForProject("someProject"); verifyNoMoreInteractions(imageExploratoryService); }