@Override
protected void setUp() throws Exception {
super.setUp();
rwUser = new TestingAuthenticationToken("rw", "supersecret", new GrantedAuthority[] {
new GrantedAuthorityImpl("READER"), new GrantedAuthorityImpl("WRITER") });
roUser = new TestingAuthenticationToken("ro", "supersecret",
new GrantedAuthority[] { new GrantedAuthorityImpl("READER") });
anonymous = new TestingAuthenticationToken("anonymous", null, null);
milUser = new TestingAuthenticationToken("military", "supersecret",
new GrantedAuthority[] { new GrantedAuthorityImpl("MILITARY") });
root = new TestingAuthenticationToken("admin", "geoserver", new GrantedAuthority[] { new GrantedAuthorityImpl(SecureTreeNode.ROOT_ROLE) });
catalog = createNiceMock(Catalog.class);
expect(catalog.getWorkspace((String) anyObject())).andReturn(
createNiceMock(WorkspaceInfo.class)).anyTimes();
replay(catalog);