@Test(expected = SpspClientException.class) public void getStreamConnectionDetails500ThrowsSpspClientException() { String testClient = "testClient"; stubFor(get(urlEqualTo("/" + testClient)) .withHeader("Accept", equalTo(SpspClient.APPLICATION_SPSP4_JSON_VALUE)) .willReturn(aResponse() .withStatus(503) )); client.getStreamConnectionDetails(paymentPointer(testClient)); }
@Override public StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer) throws InvalidReceiverClientException { Objects.requireNonNull(paymentPointer); return getStreamConnectionDetails(paymentPointerResolver.resolveHttpUrl(paymentPointer)); }
SimpleSpspClient implements SpspClient { @Override public StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer) throws InvalidReceiverClientException { Objects.requireNonNull(paymentPointer); return getStreamConnectionDetails(paymentPointerResolver.resolveHttpUrl(paymentPointer)); } }
SimpleSpspClient implements SpspClient { @Override public StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer) throws InvalidReceiverClientException { Objects.requireNonNull(paymentPointer); return getStreamConnectionDetails(paymentPointerResolver.resolveHttpUrl(paymentPointer)); } SimpleSpspClient();  SimpleSpspClient(
      final OkHttpClient httpClient, final PaymentPointerResolver paymentPointerResolver,
      final ObjectMapper objectMapper
  ); }
SimpleSpspClient implements SpspClient { @Override public StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer) throws InvalidReceiverClientException { Objects.requireNonNull(paymentPointer); return getStreamConnectionDetails(paymentPointerResolver.resolveHttpUrl(paymentPointer)); } SimpleSpspClient();  SimpleSpspClient(
      final OkHttpClient httpClient, final PaymentPointerResolver paymentPointerResolver,
      final ObjectMapper objectMapper
  ); @Override StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer); @Override StreamConnectionDetails getStreamConnectionDetails(final HttpUrl spspUrl); }
SimpleSpspClient implements SpspClient { @Override public StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer) throws InvalidReceiverClientException { Objects.requireNonNull(paymentPointer); return getStreamConnectionDetails(paymentPointerResolver.resolveHttpUrl(paymentPointer)); } SimpleSpspClient();  SimpleSpspClient(
      final OkHttpClient httpClient, final PaymentPointerResolver paymentPointerResolver,
      final ObjectMapper objectMapper
  ); @Override StreamConnectionDetails getStreamConnectionDetails(final PaymentPointer paymentPointer); @Override StreamConnectionDetails getStreamConnectionDetails(final HttpUrl spspUrl);  }