protected void assertRealmsConfigured() throws IllegalStateException {
        Collection<Realm> realms = getRealms();
        if (CollectionUtils.isEmpty(realms)) {
            String msg = "Configuration error:  No realms have been configured!  One or more realms must be "
                    + "present to execute an authentication attempt.";
            throw new IllegalStateException(msg);
        }
    }
Used by the internal {@link #doAuthenticate} implementation to ensure that the {@code realms} property
has been set.  The default implementation ensures the property is not null and not empty.

@throws IllegalStateException if the {@code realms} property is configured incorrectly.
core/src/main/java/org/apache/shiro/authc/pam/ModularRealmAuthenticator.java