Source:
<code>public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) { final INattableModelManager manager = getNattableModelManager(); if (IS_NATTABLE_WIDGET.equals(property) && expectedValue instanceof Boolean) { return <START> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell().equals(PlatformUI.getWorkbench().getDisplay().getActiveShell()) <END> && expectedValue.equals(manager != null); } if (manager != null && expectedValue instanceof Boolean) { if (HAS_FEATURE_ROW_HEADER_CONFIGURATION.equals(property)) { LabelConfigurationManagementUtils.getRowFeatureLabelConfigurationInTable(manager.getTable()); return expectedValue.equals(LabelConfigurationManagementUtils.hasRowFeatureLabelConfiguration(manager.getTable())); } else if (HAS_FEATURE_COLUMN_HEADER_CONFIGURATION.equals(property)) { return expectedValue.equals(LabelConfigurationManagementUtils.hasColumnFeatureLabelConfiguration(manager.getTable())); } else if (HAS_SLAVE_COLUMNS_AXIS_PROVIDER.equals(property)) { return expectedValue.equals(AxisUtils.getAxisProviderUsedForColumns(manager) instanceof ISlaveAxisProvider); } else if (HAS_SLAVE_ROWS_AXIS_PROVIDER.equals(property)) { return expectedValue.equals(AxisUtils.getAxisProviderUsedForRows(manager) instanceof ISlaveAxisProvider); } else if (CAN_INVERT_AXIS.equals(property)) { return expectedValue.equals(manager.canInvertAxis()); } else if (IS_HIERARCHIC_TABLE.equals(property)) { return expectedValue.equals(isHierarchicTable(manager)); } } return false; }</code><technical_language>1. exists a util method for that. 2. !=null is option 3. NatTable.hasFocus() resovle problem ? 4. this new condition tested for property of tester ? (not sure)</technical_language>

Target:
public boolean test(final Object receiver, final String property, final Object[] args, final Object expectedValue) { final INattableModelManager manager = getNattableModelManager(); if (IS_NATTABLE_WIDGET.equals(property) && expectedValue instanceof Boolean) { return expectedValue.equals(null != manager) && ((!(Boolean)expectedValue) || manager.getAdapter(NatTable.class).isFocusControl()); } if (manager != null && expectedValue instanceof Boolean) { if (HAS_FEATURE_ROW_HEADER_CONFIGURATION.equals(property)) { LabelConfigurationManagementUtils.getRowFeatureLabelConfigurationInTable(manager.getTable()); return expectedValue.equals(LabelConfigurationManagementUtils.hasRowFeatureLabelConfiguration(manager.getTable())); } else if (HAS_FEATURE_COLUMN_HEADER_CONFIGURATION.equals(property)) { return expectedValue.equals(LabelConfigurationManagementUtils.hasColumnFeatureLabelConfiguration(manager.getTable())); } else if (HAS_SLAVE_COLUMNS_AXIS_PROVIDER.equals(property)) { return expectedValue.equals(AxisUtils.getAxisProviderUsedForColumns(manager) instanceof ISlaveAxisProvider); } else if (HAS_SLAVE_ROWS_AXIS_PROVIDER.equals(property)) { return expectedValue.equals(AxisUtils.getAxisProviderUsedForRows(manager) instanceof ISlaveAxisProvider); } else if (CAN_INVERT_AXIS.equals(property)) { return expectedValue.equals(manager.canInvertAxis()); } else if (IS_HIERARCHIC_TABLE.equals(property)) { return expectedValue.equals(isHierarchicTable(manager)); } } return false; }