use of com.ingenico.connect.gateway.sdk.java.merchant.services.ServicesClient in project connect-sdk-java by Ingenico-ePayments.
the class SDKProxyTest method test.
/**
* Smoke test for using a proxy configured through SDK properties.
*/
@Test
public void test() throws URISyntaxException, IOException {
ConvertAmountParams request = new ConvertAmountParams();
request.setAmount(123L);
request.setSource("USD");
request.setTarget("EUR");
Client client = getClientWithProxy();
try {
ServicesClient services = client.merchant("9991").services();
CommunicatorConfiguration configuration = getCommunicatorConfigurationWithProxy();
Assert.assertNotNull(configuration.getProxyConfiguration());
assertProxySet(services, configuration.getProxyConfiguration());
ConvertAmount response = services.convertAmount(request);
Assert.assertNotNull(response.getConvertedAmount());
} finally {
client.close();
}
}
Aggregations