#vulnerable code 
                                @Test(expected = IOException.class)
    public void connectionFailsWithoutValidServerCertificate() throws SslConfigurationException, IOException {
        TrustStoreConfiguration tsc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, null);
        SslConfiguration sc = SslConfiguration.createSSLConfiguration(null, tsc);
        SSLSocketFactory factory = sc.getSslSocketFactory();
        SSLSocket clientSocket = (SSLSocket) factory.createSocket(TLS_TEST_HOST, TLS_TEST_PORT);
        OutputStream os = clientSocket.getOutputStream();
        os.write("GET config/login_verify2?".getBytes());
        Assert.assertTrue(false);
    } 
                            #location 4 
                            #vulnerability type NULL_DEREFERENCE
#fixed code
                                @Test(expected = IOException.class)
    public void connectionFailsWithoutValidServerCertificate() throws IOException, StoreConfigurationException {
        TrustStoreConfiguration tsc = new TrustStoreConfiguration(TestConstants.TRUSTSTORE_FILE, null, null, null);
        SslConfiguration sc = SslConfiguration.createSSLConfiguration(null, null, tsc);
        SSLSocketFactory factory = sc.getSslSocketFactory();
        SSLSocket clientSocket = (SSLSocket) factory.createSocket(TLS_TEST_HOST, TLS_TEST_PORT);
        OutputStream os = clientSocket.getOutputStream();
        os.write("GET config/login_verify2?".getBytes());
        Assert.assertTrue(false);
    }