protected boolean isSystemAccount(Subject subject) {
        PrincipalCollection pc = subject.getPrincipals();
        return pc != null && matches(pc, systemAccountUsername, systemAccountRealmName);
    }
@Test
    public void testIsSystemAccountWithNullPrincipals() {
        assertFalse(policy.isSystemAccount(new SubjectAdapter()));
    }