@Test
    public void shouldNotSetCredentialsHeaderIfUnset() {
        given(request.getType()).willReturn("GET");

        allowOrigins.add("stottie");

        setOrigin("stottie");
        setHost("bap");

        // This is default value, but just to be clear...
        config.setAllowCredentials(false);

        connector = new CorsConnector(request, config, failureFactory);
        HeaderMap responseHeaders = connector.getResponseHeaders();

        Assert.assertTrue(!connector.isFailure());
        // Header should not be set at all if allowCredentials is false.
        Assert.assertEquals(null, responseHeaders.get(CorsConnector.AC_ALLOW_CREDENTIALS_KEY));
    }
Test simple aspects of CORS

@author Marc Savy {@literal <msavy@redhat.com>}
plugins/cors-policy/src/test/java/io/apiman/plugins/cors_policy/CorsConnectorSimpleTest.java