MostRecentAction extends AbstractSurvivorshipAction { @Override public boolean canHandle(ActionParameter actionParameter) { if (!(actionParameter.getInputData() instanceof Date)) { return false; } return actionParameter.getDataset().isLatest(actionParameter.getInputData(), actionParameter.getColumn()); }  @Override boolean canHandle(ActionParameter actionParameter);  }
@Test public void testCheckCanHandle() { DataSet dataset = null; Object inputData = 100; int rowNum = 0; String column = "firstName"; String ruleName = "rule1"; String expression = "Tony,Green"; boolean ignoreBlanks = false; ActionParameter actionParameter = new ActionParameter(dataset, inputData, rowNum, column, ruleName, expression, ignoreBlanks); MostRecentAction mostRecentAction = new MostRecentAction(); boolean checkCanHandle = mostRecentAction.canHandle(actionParameter); Assert.assertFalse("100 is not a date so that result should be false", checkCanHandle); }