SecurityContextImpl securityContext = new SecurityContextImpl();
List<Authentication> authentications = new ArrayList<Authentication>();
Authentication authentication;
authentication = new Authentication();
authentication.setAuthorizations(
new BaseAuthorization[]{new AllowAllAuthorization(), new AllowNoneAuthorization()});
authentications.add(authentication);
securityContext.setAuthentications("token", authentications);
Assert.assertTrue(securityContext.isToolAuthorized(TOOL_ID));
Assert.assertTrue(securityContext.isCommandAuthorized(COMMAND_NAME));
Assert.assertTrue(securityContext.isLayerVisible(LAYER_ID));