@Test
public void testIsAuthenticationRequiredWhenAlreadyRequired() {

    Subject subject = new SubjectAdapter() {
        @Override
        public boolean isAuthenticated() {
            return true;
        }
    };
    SubjectConnectionReference sc = new SubjectConnectionReference(new ConnectionContext(), new ConnectionInfo(),
            new DefaultEnvironment(), subject);
    assertFalse(policy.isAuthenticationRequired(sc));
}