### Question:
PermissionsCheckboxHandler { public void setAllDisabled( boolean value ) { for ( PermissionsCheckboxes permissionsCheckboxes : ALL_PERMISSIONS ) { permissionsCheckboxes.permissionCheckbox.setDisabled( value ); } } PermissionsCheckboxHandler( XulCheckbox readCheckbox, XulCheckbox writeCheckbox, XulCheckbox deleteCheckbox,
      XulCheckbox manageCheckbox ); EnumSet<RepositoryFilePermission> processCheckboxes(); EnumSet<RepositoryFilePermission> processCheckboxes( boolean enableAppropriate ); void updateCheckboxes( EnumSet<RepositoryFilePermission> permissionEnumSet ); void updateCheckboxes( boolean enableAppropriate, EnumSet<RepositoryFilePermission> permissionEnumSet ); void setAllChecked( boolean value ); void setAllDisabled( boolean value );  }### Answer:
@Test public void testSetAllDisabledDisablesAll() { boolean disabled = true; permissionsCheckboxHandler.setAllDisabled( disabled ); verify( readCheckbox, times( 1 ) ).setDisabled( disabled ); verify( writeCheckbox, times( 1 ) ).setDisabled( disabled ); verify( deleteCheckbox, times( 1 ) ).setDisabled( disabled ); verify( manageCheckbox, times( 1 ) ).setDisabled( disabled ); }
@Test public void testSetAllEnabledEnablesAll() { boolean disabled = false; permissionsCheckboxHandler.setAllDisabled( disabled ); verify( readCheckbox, times( 1 ) ).setDisabled( disabled ); verify( writeCheckbox, times( 1 ) ).setDisabled( disabled ); verify( deleteCheckbox, times( 1 ) ).setDisabled( disabled ); verify( manageCheckbox, times( 1 ) ).setDisabled( disabled ); }