@Test public void readResourceThrowsIOExceptionWhenNoConnection() throws IOException, URISyntaxException { int port = 0; try { port = SocketUtils.getUnusedPort(); } catch (IOException ioexception) { fail("Unable to find an unused port"); } try { ec2ResourceFetcher.readResource(new URI("http: fail("no exception is thrown"); } catch (SdkClientException exception) { assertTrue(exception.getMessage().contains("Failed to connect")); } }
public abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers);
EC2ResourceFetcher { public abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers); }
EC2ResourceFetcher { public abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers); EC2ResourceFetcher(); @SdkTestInternalApi  EC2ResourceFetcher(ConnectionUtils connectionUtils); }
EC2ResourceFetcher { public abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers); EC2ResourceFetcher(); @SdkTestInternalApi  EC2ResourceFetcher(ConnectionUtils connectionUtils); static EC2ResourceFetcher defaultResourceFetcher(); abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers); final String readResource(URI endpoint); final String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy); }
EC2ResourceFetcher { public abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers); EC2ResourceFetcher(); @SdkTestInternalApi  EC2ResourceFetcher(ConnectionUtils connectionUtils); static EC2ResourceFetcher defaultResourceFetcher(); abstract String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy, Map<String, String> headers); final String readResource(URI endpoint); final String readResource(URI endpoint, CredentialsEndpointRetryPolicy retryPolicy);  }