public static final void findMetaData( Object object, int level, List<StringSearchResult> stringList,
    Object parentObject, Object grandParentObject ) {
    // System.out.println(Const.rightPad(" ", level)+"Finding strings in "+object.toString());

    if ( ( object == null ) || level > 5 ) {
      return;
    }

    PluginRegistry registry = PluginRegistry.getInstance();

    if ( stepPluginPackages == null ) {
      stepPluginPackages = registry.getPluginPackages( StepPluginType.class );
    }
    if ( jobEntryPluginPackages == null ) {
      jobEntryPluginPackages = registry.getPluginPackages( JobEntryPluginType.class );
    }

    Class<? extends Object> baseClass = object.getClass();
    Field[] fields = baseClass.getDeclaredFields();
    validateFields( object, level, stringList, parentObject, grandParentObject, baseClass, fields );
    if ( object instanceof TextFileOutputMeta ) {
      Field[] parentFields = baseClass.getSuperclass().getDeclaredFields();
      validateFields( object, level, stringList, parentObject, grandParentObject, baseClass, parentFields );
    }
  }
@Test
  public void testSearchConditionCase() {
    String dummyStepname = "Output";
    DummyTransMeta dummyMeta = new DummyTransMeta();
    String dummyStepPid = PluginRegistry.getInstance().getPluginId( StepPluginType.class, dummyMeta );
    StepMeta dummyStep = new StepMeta( dummyStepPid, dummyStepname, dummyMeta );

    List<StringSearchResult> stringList = new ArrayList<StringSearchResult>();
    StringSearcher.findMetaData( dummyStep, 0, stringList, dummyMeta, 0 );

    int checkCount = 0;
    String aResult = null;
    // Check that it found a couple of fields and emits the values properly
    for ( int i = 0; i < stringList.size(); i++ ) {
      aResult = stringList.get( i ).toString();
      if ( aResult.endsWith( "Dummy (stepid)" ) ) {
        checkCount++;
      } else if ( aResult.endsWith( "Output (name)" ) ) {
        checkCount++;
      }
      if ( checkCount == 2 ) {
        break;
      }
    }
    assertEquals( 2, checkCount );

    FilterRowsMeta filterRowsMeta = new FilterRowsMeta();
    Condition condition = new Condition();
    condition.setNegated( false );
    condition.setLeftValuename( "wibble_t" );
    condition.setRightValuename( "wobble_s" );
    condition.setFunction( org.pentaho.di.core.Condition.FUNC_EQUAL );
    filterRowsMeta.setDefault();
    filterRowsMeta.setCondition( condition );

    String filterRowsPluginPid = PluginRegistry.getInstance().getPluginId( StepPluginType.class, filterRowsMeta );
    StepMeta filterRowsStep = new StepMeta( filterRowsPluginPid, "Filter Rows", filterRowsMeta );

    stringList.clear();
    StringSearcher.findMetaData( filterRowsStep, 0, stringList, filterRowsMeta, 0 );

    checkCount = 0;
    for ( int i = 0; i < stringList.size(); i++ ) {
      aResult = stringList.get( i ).toString();
      if ( aResult.endsWith( "FilterRows (stepid)" ) ) {
        checkCount++;
      } else  if ( aResult.endsWith( "Filter Rows (name)" ) ) {
        checkCount++;
      }
      if ( checkCount == 2 ) {
        break;
      }
    }
    assertEquals( 2, checkCount );
  }