UserTemplate implements UserOperations { public void modifyUser(String userId, UserConfig userConfig) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); HttpEntity<UserConfig> requestEntity = new HttpEntity<UserConfig>(userConfig, headers); restOperations.exchange(USER_URL + "/" + userId, HttpMethod.PUT, requestEntity, String.class); } UserTemplate(RestOperations restOperations); UserCredentials createUser(); UserCredentials createUser(UserConfig userConfig); void modifyUser(String userId, UserConfig userConfig); void resetPassword(String userId); void deleteUser(String userId); String recoverAccount(String emailAddress); String recoverAccount(String emailAddress, String udid);  }
@Test public void modifyUser() { masterKeyMockServer.expect(requestTo("https: .andExpect(method(PUT)) .andExpect(body(readCompactedJsonResource(jsonResource("data/user-config-complete")))) .andRespond(withResponse("", responseHeaders, HttpStatus.OK, "OK")); UserConfig userConfig = UserConfig.builder().airmail(true).alias("alias").deviceTokens("token1", "token2").tags("tag1", "tag2").udid("udid").email("someuser@somedomain.com").build(); urbanAirship.userOperations().modifyUser("someuser", userConfig); masterKeyMockServer.verify(); }