### Question:
DemoStepMeta extends BaseStepMeta implements StepMetaInterface { public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev, String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository, IMetaStore metaStore ) { CheckResult cr; if ( input != null && input.length > 0 ) { cr = new CheckResult( CheckResult.TYPE_RESULT_OK, BaseMessages.getString( PKG, "Demo.CheckResult.ReceivingRows.OK" ), stepMeta ); remarks.add( cr ); } else { cr = new CheckResult( CheckResult.TYPE_RESULT_ERROR, BaseMessages.getString( PKG, "Demo.CheckResult.ReceivingRows.ERROR" ), stepMeta ); remarks.add( cr ); } } DemoStepMeta(); StepDialogInterface getDialog( Shell shell, StepMetaInterface meta, TransMeta transMeta, String name ); StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta transMeta,
      Trans disp ); StepDataInterface getStepData(); void setDefault(); String getOutputField(); void setOutputField( String outputField ); Object clone(); String getXML(); void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); void getFields( RowMetaInterface inputRowMeta, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore );  }### Answer:
@Test public void testChecks() { DemoStepMeta m = new DemoStepMeta(); List<CheckResultInterface> checkResults = new ArrayList<CheckResultInterface>(); m.check( checkResults, new TransMeta(), new StepMeta(), null, null, null, null, new Variables(), new MemoryRepository(), null ); assertFalse( checkResults.isEmpty() ); boolean foundMatch = false; for ( CheckResultInterface result : checkResults ) { if ( result.getType() == CheckResultInterface.TYPE_RESULT_ERROR && result.getText().equals( BaseMessages.getString( DemoStepMeta.class, "Demo.CheckResult.ReceivingRows.ERROR" ) ) ) { foundMatch = true; } } assertTrue( "The step checks should fail if no input fields are given", foundMatch ); checkResults.clear(); m.check( checkResults, new TransMeta(), new StepMeta(), null, new String[0], null, null, new Variables(), new MemoryRepository(), null ); assertFalse( checkResults.isEmpty() ); foundMatch = false; for ( CheckResultInterface result : checkResults ) { if ( result.getType() == CheckResultInterface.TYPE_RESULT_ERROR && result.getText().equals( BaseMessages.getString( DemoStepMeta.class, "Demo.CheckResult.ReceivingRows.ERROR" ) ) ) { foundMatch = true; } } assertTrue( "The step checks should fail if no input fields are given", foundMatch ); checkResults.clear(); m.check( checkResults, new TransMeta(), new StepMeta(), null, new String[1], null, null, new Variables(), new MemoryRepository(), null ); assertFalse( checkResults.isEmpty() ); foundMatch = false; for ( CheckResultInterface result : checkResults ) { if ( result.getType() == CheckResultInterface.TYPE_RESULT_OK && result.getText().equals( BaseMessages.getString( DemoStepMeta.class, "Demo.CheckResult.ReceivingRows.OK" ) ) ) { foundMatch = true; } } assertTrue( "The step checks should fail if no input fields are given", foundMatch ); }