@Test
void doFilterTestCorsPreflightRequest() throws Exception {

    new Expectations() {
        {
            CorsAwareNegotiateSecurityFilterTest.this.preflightRequest.getMethod();
            this.result = "OPTIONS";
            CorsAwareNegotiateSecurityFilterTest.this.preflightRequest.getHeader("Access-Control-Request-Method");
            this.result = "LOGIN";
            CorsAwareNegotiateSecurityFilterTest.this.preflightRequest.getHeader("Access-Control-Request-Headers");
            this.result = "X-Request-For";
            CorsAwareNegotiateSecurityFilterTest.this.preflightRequest.getHeader("Origin");
            this.result = "https://theorigin.preflight";
        }
    };
    this.corsAwareNegotiateSecurityFilter.doFilter(this.preflightRequest, this.preflightResponse, this.chain);
    new Verifications() {
        {
            CorsPreFlightCheck.isPreflight(CorsAwareNegotiateSecurityFilterTest.this.preflightRequest);
            this.times = 1;
            CorsAwareNegotiateSecurityFilterTest.this.chain.doFilter(
                    CorsAwareNegotiateSecurityFilterTest.this.preflightRequest,
                    CorsAwareNegotiateSecurityFilterTest.this.preflightResponse);
        }
    };
}