### Question:
PagePermission extends Permission implements Serializable { protected static int impliedMask( int mask ) { if ( ( mask & DELETE_MASK ) > 0 ) { mask |= MODIFY_MASK; } if ( ( mask & RENAME_MASK ) > 0 ) { mask |= EDIT_MASK; } if ( ( mask & MODIFY_MASK ) > 0 ) { mask |= EDIT_MASK | UPLOAD_MASK; } if ( ( mask & EDIT_MASK ) > 0 ) { mask |= COMMENT_MASK; } if ( ( mask & COMMENT_MASK ) > 0 ) { mask |= VIEW_MASK; } if ( ( mask & UPLOAD_MASK ) > 0 ) { mask |= VIEW_MASK; } 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 testImpliedMask() { int result = ( PagePermission.DELETE_MASK | PagePermission.MODIFY_MASK | PagePermission.EDIT_MASK | PagePermission.COMMENT_MASK | PagePermission.UPLOAD_MASK | PagePermission.VIEW_MASK ); Assertions.assertEquals( result, PagePermission.impliedMask( PagePermission.DELETE_MASK ) ); result = ( PagePermission.RENAME_MASK | PagePermission.EDIT_MASK | PagePermission.COMMENT_MASK | PagePermission.VIEW_MASK ); Assertions.assertEquals( result, PagePermission.impliedMask( PagePermission.RENAME_MASK ) ); result = ( PagePermission.MODIFY_MASK | PagePermission.EDIT_MASK | PagePermission.COMMENT_MASK | PagePermission.UPLOAD_MASK | PagePermission.VIEW_MASK ); Assertions.assertEquals( result, PagePermission.impliedMask( PagePermission.MODIFY_MASK ) ); result = ( PagePermission.EDIT_MASK | PagePermission.COMMENT_MASK | PagePermission.VIEW_MASK ); Assertions.assertEquals( result, PagePermission.impliedMask( PagePermission.EDIT_MASK ) ); result = ( PagePermission.COMMENT_MASK | PagePermission.VIEW_MASK ); Assertions.assertEquals( result, PagePermission.impliedMask( PagePermission.COMMENT_MASK ) ); result = ( PagePermission.UPLOAD_MASK | PagePermission.VIEW_MASK ); Assertions.assertEquals( result, PagePermission.impliedMask( PagePermission.UPLOAD_MASK ) ); }