@Test public void testAdminCommand() { UserHolder.set(SYSTEM); this.interceptor.handle(ADMIN_COMMAND_MESSAGE); }
@Test public void testNormalCommand() { UserHolder.set(GUEST_USER); this.interceptor.handle(NORMAL_COMMAND_MESSAGE); }
@Test(expected = UserAuthorizationException.class) public void testNotAuthorizedUser() { UserHolder.set(GUEST_USER); this.interceptor.handle(ADMIN_COMMAND_MESSAGE); }
@Before public void setup() { UserHolder.clear(); }