public void testSecurityContext() {
DefaultCxfMessageMapper mapper = new DefaultCxfMessageMapper();
HttpServletRequest request = EasyMock.createMock(HttpServletRequest.class);
request.getUserPrincipal();
EasyMock.expectLastCall().andReturn(new SimplePrincipal("barry"));
request.isUserInRole("role1");
EasyMock.expectLastCall().andReturn(true);
request.isUserInRole("role2");
EasyMock.expectLastCall().andReturn(false);
EasyMock.replay(request);