org.apache.shiro.mgt.SecurityManager securityManager = new DefaultSecurityManager();
plugin.setSecurityManager(securityManager);
assertNull(plugin.getEnvironment()); //we will auto-create one when only a sm is provided
plugin.installPlugin(new MutableBrokerFilter(null));
assertSame(securityManager, plugin.getSecurityManager());
assertNotNull(plugin.getEnvironment());
assertSame(securityManager, plugin.getEnvironment().getSecurityManager());
}