protected AuthenticationInfo buildAuthenticationInfo(Object principal, Object credentials) {
            Collection<Object> principals = new ArrayList<Object>(3);
            principals.add(new UserIdPrincipal(USER_ID));
            principals.add(new UsernamePrincipal(USERNAME));
            principals.add(USER_ID + USERNAME);
            return new SimpleAuthenticationInfo(principals, PASSWORD, getName());
        }
Simple test case for AuthorizingRealm.
<p/>
TODO - this could/should be expanded to be more robust end to end test for the AuthorizingRealm
core/src/test/java/org/apache/shiro/realm/AuthorizingRealmTest.java