@Test public void calculatorShouldClearDataInstance() throws Exception { RowMeta inputRowMeta = new RowMeta(); ValueMetaInteger valueMeta = new ValueMetaInteger( "Value" ); inputRowMeta.addValueMeta( valueMeta ); RowSet inputRowSet = smh.getMockInputRowSet( new Object[] { -1L } ); inputRowSet.setRowMeta( inputRowMeta ); Calculator calculator = new Calculator( smh.stepMeta, smh.stepDataInterface, 0, smh.transMeta, smh.trans ); calculator.addRowSetToInputRowSets( inputRowSet ); calculator.setInputRowMeta( inputRowMeta ); calculator.init( smh.initStepMetaInterface, smh.initStepDataInterface ); CalculatorMeta meta = new CalculatorMeta(); meta.setCalculation( new CalculatorMetaFunction[] { new CalculatorMetaFunction( "test", CalculatorMetaFunction.CALC_ABS, "Value", null, null, ValueMetaInterface.TYPE_STRING, 0, 0, false, "", "", "", "" ) } ); CalculatorData data = new CalculatorData(); data = spy( data ); calculator.processRow( meta, data ); verify( data ).getValueMetaFor( eq( valueMeta.getType() ), anyString() ); calculator.processRow( meta, data ); verify( data ).clearValuesMetaMapping(); }