### Question:
PagePermission extends Permission implements Serializable { protected static int createMask( final String actions ) { if ( actions == null || actions.length() == 0 ) { throw new IllegalArgumentException( "Actions cannot be blank or null" ); } int mask = 0; final String[] actionList = StringUtils.split( actions, ACTION_SEPARATOR ); for( final String action : actionList ) { if ( action.equalsIgnoreCase( VIEW_ACTION ) ) { mask |= VIEW_MASK; } else if ( action.equalsIgnoreCase( EDIT_ACTION ) ) { mask |= EDIT_MASK; } else if ( action.equalsIgnoreCase( COMMENT_ACTION ) ) { mask |= COMMENT_MASK; } else if ( action.equalsIgnoreCase( MODIFY_ACTION ) ) { mask |= MODIFY_MASK; } else if ( action.equalsIgnoreCase( UPLOAD_ACTION ) ) { mask |= UPLOAD_MASK; } else if ( action.equalsIgnoreCase( DELETE_ACTION ) ) { mask |= DELETE_MASK; } else if ( action.equalsIgnoreCase( RENAME_ACTION ) ) { mask |= RENAME_MASK; } else { throw new IllegalArgumentException( "Unrecognized action: " + action ); } } return mask; } protected  PagePermission(); private  PagePermission( final String actions );  PagePermission( final String page, final String actions );  PagePermission( final Page page, final String actions ); boolean equals( final Object obj ); String getActions(); String getPage(); String getWiki(); int hashCode(); boolean implies( final Permission permission ); @Override PermissionCollection newPermissionCollection(); String toString(); static final String COMMENT_ACTION; static final String DELETE_ACTION; static final String EDIT_ACTION; static final String MODIFY_ACTION; static final String RENAME_ACTION; static final String UPLOAD_ACTION; static final String VIEW_ACTION; static final PagePermission COMMENT; static final PagePermission DELETE; static final PagePermission EDIT; static final PagePermission RENAME; static final PagePermission MODIFY; static final PagePermission UPLOAD; static final PagePermission VIEW; }### Answer:
@Test public final void testCreateMask() { Assertions.assertEquals( 1, PagePermission.createMask( "view" ) ); Assertions.assertEquals( 19, PagePermission.createMask( "view,edit,delete" ) ); Assertions.assertEquals( 19, PagePermission.createMask( "edit,delete,view" ) ); Assertions.assertEquals( 14, PagePermission.createMask( "edit,comment,upload" ) ); }