@BeforeClass
	public static void init() throws Exception {

		// setup server 1, will use first keystore/truststore with client auth

		// jks format
		byte[] sampleTruststore1 = Base64.decode(TEST_TS1);
		byte[] sampleKeystore1 = Base64.decode(TEST_KS1);

		FILE_KS1 = File.createTempFile("SecureGetTest1", ".keystore");
		FILE_TS1 = File.createTempFile("SecureGetTest1", ".truststore");

		FileOutputStream keystoreFileOut = new FileOutputStream(FILE_KS1);
        try {
            keystoreFileOut.write(sampleKeystore1);
        } finally {
            keystoreFileOut.close();
        }

		FileOutputStream truststoreFileOut = new FileOutputStream(FILE_TS1);
        try {
            truststoreFileOut.write(sampleTruststore1);
        } finally {
            truststoreFileOut.close();
        }

		try{
			testServer1 = new SimpleSSLTestServer(FILE_TS1, PASSWORD, FILE_KS1, PASSWORD, true);
		} catch (Exception e) {
			e.printStackTrace();
			fail(e.getMessage());
		}

		SERVICE_URI1 = "https://127.0.0.1:" + testServer1.getPort() + "/";

		// setup server 2, will use second keystore truststore without client auth

		// jks format
		byte[] sampleTruststore2 = Base64.decode(TEST_TS2);
		byte[] sampleKeystore2 = Base64.decode(TEST_KS2);

		FILE_KS2 = File.createTempFile("SecureGetTest2", ".keystore");
		FILE_TS2 = File.createTempFile("SecureGetTest2", ".truststore");

		keystoreFileOut = new FileOutputStream(FILE_KS2);
        try {
            keystoreFileOut.write(sampleKeystore2);
        } finally {
            keystoreFileOut.close();
        }

		truststoreFileOut = new FileOutputStream(FILE_TS2);
        try {
            truststoreFileOut.write(sampleTruststore2);
        } finally {
            truststoreFileOut.close();
        }

		try{
			testServer2 = new SimpleSSLTestServer(FILE_TS2, PASSWORD, FILE_KS2, PASSWORD, false);
		} catch (Exception e) {
			e.printStackTrace();
			fail(e.getMessage());
		}

		SERVICE_URI2 = "https://127.0.0.1:" + testServer2.getPort() + "/";
	}
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