@Test public void recoverAccount() { masterKeyMockServer.expect(requestTo("https: .andExpect(method(POST)) .andExpect(body(readCompactedJsonResource(jsonResource("data/user-recover")))) .andRespond(withResponse(jsonResource("data/user-recover-response"), responseHeaders, HttpStatus.OK, "OK")); String recoveryId = urbanAirship.userOperations().recoverAccount("someuser@somedomain.com"); assertEquals("1232134124", recoveryId); masterKeyMockServer.verify(); }
public String recoverAccount(String emailAddress) { return restOperations.postForObject(USER_URL + "/recover", new RecoveryRequest(emailAddress), RecoveryResponse.class).getRecoveryStatusId(); }
UserTemplate implements UserOperations { public String recoverAccount(String emailAddress) { return restOperations.postForObject(USER_URL + "/recover", new RecoveryRequest(emailAddress), RecoveryResponse.class).getRecoveryStatusId(); } }
UserTemplate implements UserOperations { public String recoverAccount(String emailAddress) { return restOperations.postForObject(USER_URL + "/recover", new RecoveryRequest(emailAddress), RecoveryResponse.class).getRecoveryStatusId(); } UserTemplate(RestOperations restOperations); }
UserTemplate implements UserOperations { public String recoverAccount(String emailAddress) { return restOperations.postForObject(USER_URL + "/recover", new RecoveryRequest(emailAddress), RecoveryResponse.class).getRecoveryStatusId(); } 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); }
UserTemplate implements UserOperations { public String recoverAccount(String emailAddress) { return restOperations.postForObject(USER_URL + "/recover", new RecoveryRequest(emailAddress), RecoveryResponse.class).getRecoveryStatusId(); } 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);  }