ChangePasswordService { public FluentResponse updatePassword(String old_password, String new_password, String new_password_confirmation) throws IOException { return fluentRequest .path("/users/update_password") .context(context) .param("forms_change_password_form[old_password]", old_password) .param("forms_change_password_form[new_password]", new_password) .param("forms_change_password_form[new_password_confirmation]", new_password_confirmation) .post(); } @Inject  ChangePasswordService(RapidFtrApplication context, FluentRequest fluentRequest); FluentResponse updatePassword(String old_password, String new_password, String new_password_confirmation);  }
@Test public void shouldRegisterUnverifiedUser() throws Exception { RapidFtrApplication mockContext = RapidFtrApplication.getApplicationInstance(); mockContext.getSharedPreferences().edit().putString(SERVER_URL_PREF, "whatever").commit(); FluentRequest mockFluentRequest = spy(new FluentRequest()); getFakeHttpLayer().addHttpResponseRule("POST", "http: new ChangePasswordService(mockContext, mockFluentRequest).updatePassword("password1", "password2", "password2"); }