### Question:
UserSettingsResource { @POST public Response saveSettings(@Auth UserInfo userInfo, @NotBlank String settings) { LOGGER.debug("Saves settings for user {}, content is {}", userInfo.getName(), settings); userSettingService.saveUISettings(userInfo, settings); return Response.ok().build(); } @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 saveSettings() { doNothing().when(userSettingService).saveUISettings(any(UserInfo.class), anyString()); final Response response = resources.getJerseyTest() .target("/user/settings") .request() .header("Authorization", "Bearer " + TOKEN) .post(Entity.json("someSettings")); assertEquals(HttpStatus.SC_OK, response.getStatus()); assertNull(response.getHeaderString(HttpHeaders.CONTENT_TYPE)); verify(userSettingService).saveUISettings(refEq(getUserInfo()), eq("someSettings")); verifyNoMoreInteractions(userSettingService); }