@Test
    public void shouldFailWhenApiDoesNotTrustGateway() {
        config.put(TLSOptions.TLS_TRUSTSTORE, getResourcePath("2waytest/service_not_trust_gw/gateway_ts.jks"));
        config.put(TLSOptions.TLS_TRUSTSTOREPASSWORD, "changeme");
        config.put(TLSOptions.TLS_KEYSTORE, getResourcePath("2waytest/service_not_trust_gw/gateway_ks.jks"));
        config.put(TLSOptions.TLS_KEYSTOREPASSWORD, "changeme");
        config.put(TLSOptions.TLS_KEYPASSWORD, "changeme");
        config.put(TLSOptions.TLS_ALLOWANYHOST, "true");
        config.put(TLSOptions.TLS_ALLOWSELFSIGNED, "false");

        HttpConnectorFactory factory = new HttpConnectorFactory(config);
        IApiConnector connector = factory.createConnector(request, api, RequiredAuthType.MTLS, false, new ConnectorConfigImpl());
        IApiConnection connection = connector.connect(request,
             (IAsyncResult<IApiConnectionResponse> result) -> {
                 Assert.assertTrue(result.isError());

                 System.out.println(result.getError());
                 Assert.assertTrue(result.getError() instanceof ConnectorException);
                 // Would like to assert on SSL error, but is sun specific info
                 // TODO improve connector to handle this situation better
             });

        connection.end();
    }
Scenario:
  - no CA inherited trust
  - gateway does trust the API
  - API does <em>not</em> trust gateway
gateway/platforms/servlet/src/test/java/io/apiman/gateway/platforms/servlet/auth/tls/BasicMutualAuthTest.java