Subject subject = thread.getSubject();
Assert.assertTrue(subject.hasRole("RoleA"));
// if we login again with the jcoder user we should need to bind the request again
try {
securitySystem.login(new UsernamePasswordToken("jcoder", "jcoder"));
Assert.fail("Expected IllegalStateException");
}
catch (IllegalStateException e) {
// this is not a great exception to catch...
// but we check the success on the next call