### Question:
WikiPermission extends Permission implements Serializable { public WikiPermission( String wiki, String actions ) { super( wiki ); String[] pageActions = actions.toLowerCase().split( "," ); Arrays.sort( pageActions, String.CASE_INSENSITIVE_ORDER ); m_mask = createMask( actions ); StringBuilder buffer = new StringBuilder(); for( int i = 0; i < pageActions.length; i++ ) { buffer.append( pageActions[i] ); if ( i < ( pageActions.length - 1 ) ) { buffer.append( "," ); } } m_actionString = buffer.toString(); m_wiki = ( wiki == null ) ? WILDCARD : wiki; } WikiPermission( String wiki, String actions ); boolean equals( Object obj ); String getActions(); String getWiki(); int hashCode(); boolean implies( Permission permission ); PermissionCollection newPermissionCollection(); String toString(); static final String CREATE_GROUPS_ACTION; static final String CREATE_PAGES_ACTION; static final String LOGIN_ACTION; static final String EDIT_PREFERENCES_ACTION; static final String EDIT_PROFILE_ACTION; static final String WILDCARD; static final WikiPermission CREATE_GROUPS; static final WikiPermission CREATE_PAGES; static final WikiPermission LOGIN; static final WikiPermission EDIT_PREFERENCES; static final WikiPermission EDIT_PROFILE; }### Answer:
@Test public void testWikiPermission() { WikiPermission p = new WikiPermission("*", "createPages"); Assertions.assertEquals("*", p.getName()); Assertions.assertEquals("*", p.getWiki()); Assertions.assertEquals("createpages", p.getActions()); }