@Test
	public void testClientRejectsWrongServer() throws Exception{

		AbstractConfiguration cm = ConfigurationManager.getConfigInstance();

		String name = "GetPostSecureTest" + ".testClientRejectsWrongServer";

		String configPrefix = name + "." + "ribbon";

		cm.setProperty(configPrefix + "." + CommonClientConfigKey.IsSecure, "true");
		cm.setProperty(configPrefix + "." + CommonClientConfigKey.SecurePort, Integer.toString(testServer2.getPort()));
		cm.setProperty(configPrefix + "." + CommonClientConfigKey.IsHostnameValidationRequired, "false");
		cm.setProperty(configPrefix + "." + CommonClientConfigKey.TrustStore, FILE_TS1.getAbsolutePath()); // <--
		cm.setProperty(configPrefix + "." + CommonClientConfigKey.TrustStorePassword, PASSWORD);

		RestClient rc = (RestClient) ClientFactory.getNamedClient(name);

		testServer2.accept();

		URI getUri = new URI(SERVICE_URI2 + "test/");
		HttpRequest request = HttpRequest.newBuilder().uri(getUri).queryParams("name", "test").build();
		try{
			rc.execute(request);

			fail("expecting ssl hostname validation error");

		}catch(ClientHandlerException che){
			assertTrue(che.getMessage().indexOf("peer not authenticated") > -1);
		}
	}
Test TLS configurations work against a very dumbed down test server.

@author jzarfoss
ribbon-httpclient/src/test/java/com/netflix/niws/client/http/SecureGetTest.java