@Before
    public void before() {
        MockitoAnnotations.initMocks(this);

        config = new CorsConfigBean();

        allowHeaders = config.getAllowHeaders();
        allowMethods = config.getAllowMethods();
        allowOrigins = config.getAllowOrigin();
        exposeHeaders = config.getExposeHeaders();

        // Match defaults in json-schema
        config.setAllowCredentials(false);
        config.setErrorOnCorsFailure(true);
        config.setMaxAge(0);

        given(request.getHeaders()).willReturn(requestHeaders);
    }
Common test base

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