@Test public void shouldRegister() throws Exception { String responseAsString = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + "<authorizationRequest>" + "<code>D8DD848AC9C98D9EE44C5FB3A1E53913</code>" + "<date>2016-11-09T00:00:00.000-03:00</date>" + "</authorizationRequest>"; HttpResponse response = new HttpResponse(200, responseAsString); when(httpClient.execute(any(HttpMethod.class), anyString(), anyMap(), any(HttpRequestBody.class))).thenReturn(response); RegisteredAuthorization registeredAuthorization = authorizationsResource .register(authorizationRegistration); assertEquals("D8DD848AC9C98D9EE44C5FB3A1E53913", registeredAuthorization.getCode()); assertEquals("https: "D8DD848AC9C98D9EE44C5FB3A1E53913", registeredAuthorization.getRedirectURL()); }
public RegisteredAuthorization register( Builder<AuthorizationRegistration> authorizationRegistrationBuilder) { return register(authorizationRegistrationBuilder.build()); }
AuthorizationsResource { public RegisteredAuthorization register( Builder<AuthorizationRegistration> authorizationRegistrationBuilder) { return register(authorizationRegistrationBuilder.build()); } }
AuthorizationsResource { public RegisteredAuthorization register( Builder<AuthorizationRegistration> authorizationRegistrationBuilder) { return register(authorizationRegistrationBuilder.build()); } AuthorizationsResource(PagSeguro pagSeguro, HttpClient httpClient); }
AuthorizationsResource { public RegisteredAuthorization register( Builder<AuthorizationRegistration> authorizationRegistrationBuilder) { return register(authorizationRegistrationBuilder.build()); } AuthorizationsResource(PagSeguro pagSeguro, HttpClient httpClient); RegisteredAuthorization register(
        Builder<AuthorizationRegistration> authorizationRegistrationBuilder); RegisteredAuthorization register(AuthorizationRegistration authorizationRegistration); RegisteredAuthorization registerWithSuggestion(AuthorizationRegistration authorizationRegistration); AuthorizationSearchResource search(); }
AuthorizationsResource { public RegisteredAuthorization register( Builder<AuthorizationRegistration> authorizationRegistrationBuilder) { return register(authorizationRegistrationBuilder.build()); } AuthorizationsResource(PagSeguro pagSeguro, HttpClient httpClient); RegisteredAuthorization register(
        Builder<AuthorizationRegistration> authorizationRegistrationBuilder); RegisteredAuthorization register(AuthorizationRegistration authorizationRegistration); RegisteredAuthorization registerWithSuggestion(AuthorizationRegistration authorizationRegistration); AuthorizationSearchResource search();  }