assertEquals( a.getJSP(), b.getJSP() );
assertEquals( a.getURLPattern(), b.getURLPattern() );
assertEquals( a.getContentTemplate(), b.getContentTemplate() );
assertNotNull( b.getTarget() );
assertNotNull( b.requiredPermission() );
assertEquals( new WikiPermission( wiki, "createGroups" ), b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
// Do the same with other commands
a = WikiCommand.ERROR;
b = a.targetedCommand( wiki );
assertNotSame( a, b );
assertNotNull( b.getTarget() );
assertNull( b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
a = WikiCommand.FIND;
b = a.targetedCommand( wiki );
assertNotSame( a, b );
assertNotNull( b.getTarget() );
assertNull( b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
a = WikiCommand.INSTALL;
b = a.targetedCommand( wiki );
assertNotSame( a, b );
assertNotNull( b.getTarget() );
assertNull( b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
a = WikiCommand.LOGIN;
b = a.targetedCommand( wiki );
assertNotSame( a, b );
assertNotNull( b.getTarget() );
assertNotNull( b.requiredPermission() );
assertEquals( new WikiPermission( wiki, "login" ), b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
a = WikiCommand.LOGOUT;
b = a.targetedCommand( wiki );
assertNotSame( a, b );
assertNotNull( b.getTarget() );
assertNotNull( b.requiredPermission() );
assertEquals( new WikiPermission( wiki, "login" ), b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
a = WikiCommand.PREFS;
b = a.targetedCommand( wiki );
assertNotSame( a, b );
assertNotNull( b.getTarget() );
assertNotNull( b.requiredPermission() );
assertEquals( new WikiPermission( wiki, "editProfile" ), b.requiredPermission() );
assertEquals( wiki, b.getTarget() );
}