public void setSecurityContextFactory(SecurityContextFactory securityContextFactory) {
        if (securityContextFactory == null) {
            throw new IllegalArgumentException("SecurityContextFactory argument cannot be null.");
        }
        this.securityContextFactory = securityContextFactory;
    }
@Test
    public void testSetSecurityContextFactory() {
        SecurityContextFactory factory = new SecurityContextFactory() {
            @Override
            public SecurityContext createSecurityContext(SubjectConnectionReference ref) {
                return null;
            }
        };
        filter.setSecurityContextFactory(factory);
        assertSame(factory, filter.getSecurityContextFactory());
    }