### Question:
ExploratoryResource implements ExploratoryAPI { @GET @Path("/{project}/{name}/cluster/config") public Response getClusterConfig(@Auth UserInfo userInfo, @PathParam("project") String project, @PathParam("name") String name) { log.debug("Getting exploratory {} spark cluster configuration for user {}", name, userInfo.getName()); return Response.ok(exploratoryService.getClusterConfig(userInfo, project, name)).build(); } @Inject  ExploratoryResource(ExploratoryService exploratoryService); @GET Response getExploratoryPopUp(@Auth UserInfo userInfo); @PUT Response create(@Auth UserInfo userInfo,
						   @Valid @NotNull ExploratoryCreateFormDTO formDTO); @POST @RolesAllowed(UserSessionDurationAuthorizer.SHORT_USER_SESSION_DURATION) String start(@Auth UserInfo userInfo,
						@Valid @NotNull ExploratoryActionFormDTO formDTO); @DELETE @Path("/{project}/{name}/stop") String stop(@Auth UserInfo userInfo,
					   @PathParam("project") String project,
					   @PathParam("name") String name); @DELETE @Path("/{project}/{name}/terminate") String terminate(@Auth UserInfo userInfo,
							@PathParam("project") String project,
							@PathParam("name") String name); @PUT @Path("/{project}/{name}/reconfigure") Response reconfigureSpark(@Auth UserInfo userInfo,
									 @PathParam("project") String project,
									 @PathParam("name") String name,
									 List<ClusterConfig> config); @GET @Path("/{project}/{name}/cluster/config") Response getClusterConfig(@Auth UserInfo userInfo,
									 @PathParam("project") String project,
									 @PathParam("name") String name);  }### Answer:
@Test public void getSparkConfig() { final ClusterConfig config = new ClusterConfig(); config.setClassification("test"); when(exploratoryService.getClusterConfig(any(UserInfo.class), anyString(), anyString())).thenReturn(Collections.singletonList(config)); final Response response = resources.getJerseyTest() .target("/infrastructure_provision/exploratory_environment/someProject/someName/cluster/config") .request() .header("Authorization", "Bearer " + TOKEN) .get(); final List<ClusterConfig> clusterConfigs = response.readEntity(new GenericType<List<ClusterConfig>>() { }); assertEquals(HttpStatus.SC_OK, response.getStatus()); assertEquals(1, clusterConfigs.size()); assertEquals("test", clusterConfigs.get(0).getClassification()); verify(exploratoryService).getClusterConfig(refEq(getUserInfo()), eq("someProject"), eq("someName")); verifyNoMoreInteractions(exploratoryService); }