public TestName name = new TestName();
@Before
public void setup() {
ThreadContext.remove();
Ini config = new Ini();
config.setSectionProperty("main", "myRealm", "org.apache.shiro.realm.jdbc.JdbcRealm");
config.setSectionProperty("main", "myRealmCredentialsMatcher", "org.apache.shiro.authc.credential.Sha256CredentialsMatcher");
config.setSectionProperty("main", "myRealm.credentialsMatcher", "$myRealmCredentialsMatcher");
config.setSectionProperty("main", "securityManager.sessionManager.sessionValidationSchedulerEnabled", "false");
IniSecurityManagerFactory factory = new IniSecurityManagerFactory(config);
securityManager = (DefaultSecurityManager) factory.createInstance();
SecurityUtils.setSecurityManager(securityManager);