public void setSecurityContextFactory(SecurityContextFactory securityContextFactory) {
        if (securityContextFactory == null) {
            throw new IllegalArgumentException("SecurityContextFactory argument cannot be null.");
        }
        this.securityContextFactory = securityContextFactory;
    }
@Test(expected = IllegalArgumentException.class)
    public void setNullSecurityContextFactory() {
        filter.setSecurityContextFactory(null);
    }