@Test public void testGetRestEndPointURI() { given(config.getScheme()).willReturn("http"); given(config.getHost()).willReturn("host1"); given(config.getPath()).willReturn("path1"); given(config.getPort()).willReturn(5); URI uri = rest.getRestEndPointURI(); then(uri.toString()).isEqualTo("http: }
@Override public URI getRestEndPointURI() { URI assignmentURI = null; try { URIBuilder uriBuilder = new URIBuilder().setScheme(configuration.getScheme()) .setHost(configuration.getHost()) .setPath(configuration.getPath()); int port = configuration.getPort(); if (port != 0) { uriBuilder.setPort(port); } assignmentURI = uriBuilder.build(); } catch (URISyntaxException e) { LOGGER.error("URL Syntax Error: ", e); } return assignmentURI; }
DefaultRestEndPoint implements RestEndPoint { @Override public URI getRestEndPointURI() { URI assignmentURI = null; try { URIBuilder uriBuilder = new URIBuilder().setScheme(configuration.getScheme()) .setHost(configuration.getHost()) .setPath(configuration.getPath()); int port = configuration.getPort(); if (port != 0) { uriBuilder.setPort(port); } assignmentURI = uriBuilder.build(); } catch (URISyntaxException e) { LOGGER.error("URL Syntax Error: ", e); } return assignmentURI; } }
DefaultRestEndPoint implements RestEndPoint { @Override public URI getRestEndPointURI() { URI assignmentURI = null; try { URIBuilder uriBuilder = new URIBuilder().setScheme(configuration.getScheme()) .setHost(configuration.getHost()) .setPath(configuration.getPath()); int port = configuration.getPort(); if (port != 0) { uriBuilder.setPort(port); } assignmentURI = uriBuilder.build(); } catch (URISyntaxException e) { LOGGER.error("URL Syntax Error: ", e); } return assignmentURI; } @Inject  DefaultRestEndPoint(RestEndPoint.Configuration configuration); }
DefaultRestEndPoint implements RestEndPoint { @Override public URI getRestEndPointURI() { URI assignmentURI = null; try { URIBuilder uriBuilder = new URIBuilder().setScheme(configuration.getScheme()) .setHost(configuration.getHost()) .setPath(configuration.getPath()); int port = configuration.getPort(); if (port != 0) { uriBuilder.setPort(port); } assignmentURI = uriBuilder.build(); } catch (URISyntaxException e) { LOGGER.error("URL Syntax Error: ", e); } return assignmentURI; } @Inject  DefaultRestEndPoint(RestEndPoint.Configuration configuration); @Override URI getRestEndPointURI(); @Override Boolean useProxy(); @Override int getRetries(); @Override RetryPolicy getRetryPolicy(); }
DefaultRestEndPoint implements RestEndPoint { @Override public URI getRestEndPointURI() { URI assignmentURI = null; try { URIBuilder uriBuilder = new URIBuilder().setScheme(configuration.getScheme()) .setHost(configuration.getHost()) .setPath(configuration.getPath()); int port = configuration.getPort(); if (port != 0) { uriBuilder.setPort(port); } assignmentURI = uriBuilder.build(); } catch (URISyntaxException e) { LOGGER.error("URL Syntax Error: ", e); } return assignmentURI; } @Inject  DefaultRestEndPoint(RestEndPoint.Configuration configuration); @Override URI getRestEndPointURI(); @Override Boolean useProxy(); @Override int getRetries(); @Override RetryPolicy getRetryPolicy();  }