private void assertRealmSecurityManager(SecurityManager securityManager) {
        if (securityManager == null) {
            throw new NullPointerException("securityManager instance cannot be null");
        }
        if (!(securityManager instanceof RealmSecurityManager)) {
            String msg = "securityManager instance is not a " + RealmSecurityManager.class.getName()
                    + " instance.  This is required to access or configure realms on the instance.";
            throw new ConfigurationException(msg);
        }
    }
Creates a new instance.  See the {@link #getInstance()} JavaDoc for detailed explanation of how an INI
source will be resolved to use to build the instance.
core/src/main/java/org/apache/shiro/ini/IniSecurityManagerFactory.java