JUnit rule to simplify apache shiro unit tests.