### Question:
UserSettingsResource { @GET public String getSettings(@Auth UserInfo userInfo) { String settings = userSettingService.getUISettings(userInfo); LOGGER.debug("Returns settings for user {}, content is {}", userInfo.getName(), settings); return settings; } @Inject  UserSettingsResource(UserSettingService userSettingService); @GET String getSettings(@Auth UserInfo userInfo); @POST Response saveSettings(@Auth UserInfo userInfo,
								 @NotBlank String settings); @PUT @Path("budget") @RolesAllowed("/user/settings") Response updateUsersBudget(@Auth UserInfo userInfo,
									  @Valid @NotEmpty List<UserDTO> budgets);  }### Answer:
@Test public void getSettings() { when(userSettingService.getUISettings(any(UserInfo.class))).thenReturn("someSettings"); final Response response = resources.getJerseyTest() .target("/user/settings") .request() .header("Authorization", "Bearer " + TOKEN) .get(); assertEquals(HttpStatus.SC_OK, response.getStatus()); assertEquals("someSettings", response.readEntity(String.class)); assertEquals(MediaType.APPLICATION_JSON, response.getHeaderString(HttpHeaders.CONTENT_TYPE)); verify(userSettingService).getUISettings(refEq(getUserInfo())); verifyNoMoreInteractions(userSettingService); }