@Test
    public void shouldFailWhenCANotTrusted() {
        // Keystore does not trust the root CA API is signed with.
        config.put(TLSOptions.TLS_TRUSTSTORE, getResourcePath("2waytest/basic_mutual_auth/gateway_ts.jks"));
        config.put(TLSOptions.TLS_TRUSTSTOREPASSWORD, "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.DEFAULT, false, new ConnectorConfigImpl());
        IApiConnection connection = connector.connect(request,
                new IAsyncResultHandler<IApiConnectionResponse>() {

         @Override
         public void handle(IAsyncResult<IApiConnectionResponse> result) {
             Assert.assertTrue(result.isError());
             System.out.println(result.getError());
             Assert.assertTrue(result.getError() instanceof ConnectorException);
         }
        });

        connection.end();
    }
Scenario:
  - CA is only in API trust store, missing from gateway trust store
  - Gateway does not trust API, as it does not trust CA
  - API trusts gateway via CA
gateway/platforms/servlet/src/test/java/io/apiman/gateway/platforms/servlet/auth/tls/StandardTLSTest.java