### Question:
AWS3Signer extends AbstractAWSSigner { boolean shouldUseHttpsScheme(Request<?> request) { try { String protocol = StringUtils.lowerCase(request.getEndpoint().toURL().getProtocol()); if ("http".equals(protocol)) { return false; } else if ("https".equals(protocol)) { return true; } else { throw new AmazonClientException("Unknown request endpoint protocol " + "encountered while signing request: " + protocol); } } catch (MalformedURLException e) { throw new AmazonClientException("Unable to parse request endpoint during signing", e); } }  @Override void sign(Request<?> request, AWSCredentials credentials);  }### Answer:
@Test public void testShouldUseHttps() throws URISyntaxException { Request<?> request = new DefaultRequest("testService"); request.setEndpoint(new URI("https: assertTrue(signer.shouldUseHttpsScheme(request)); }
@Test public void testShouldNotUseHttps() throws URISyntaxException { Request<?> request = new DefaultRequest("testService"); request.setEndpoint(new URI("http: assertFalse(signer.shouldUseHttpsScheme(request)); }