@Override
  public Set<ComponentDerivationRecord> getChangeRecords( GetXMLDataMeta meta )
    throws MetaverseAnalyzerException {
    Set<ComponentDerivationRecord> changes = new HashSet<>();

    boolean isInFields = meta.isInFields();
    boolean isAFile = meta.getIsAFile();
    boolean isAUrl = meta.isReadUrl();

    // if we are getting xml from a field, we need to add the "derives" links from the xml to the output fields
    if ( isInFields && !isAFile && !isAUrl ) {
      GetXMLDataField[] fields = baseStepMeta.getInputFields();
      if ( getInputs() != null ) {
        Set<StepField> inputFields = getInputs().getFieldNames();

        for ( StepField inputField : inputFields ) {
          if ( inputField.getFieldName().equals( meta.getXMLField() ) ) {
            // link this to all of the outputs that come from the xml
            for ( GetXMLDataField field : fields ) {
              ComponentDerivationRecord change = new ComponentDerivationRecord( meta.getXMLField(), field.getName() );
              changes.add( change );
            }
            break;
          }
        }
      }
    }
    return changes;
  }
@Test
  public void testGetChangeRecords() throws Exception {

    when( meta.isInFields() ).thenReturn( true );
    when( meta.getIsAFile() ).thenReturn( false );
    when( meta.isReadUrl() ).thenReturn( false );
    when( meta.getXMLField() ).thenReturn( "xml" );
    analyzer.setBaseStepMeta( meta );

    GetXMLDataField[] fields = new GetXMLDataField[2];
    GetXMLDataField field1 = new GetXMLDataField( "name" );
    GetXMLDataField field2 = new GetXMLDataField( "age" );
    field1.setXPath( "field1/xpath" );
    field2.setElementType( 1 );
    field1.setResultType( 1 );
    field2.setRepeated( true );

    fields[0] = field1;
    fields[1] = field2;
    when( meta.getInputFields() ).thenReturn( fields );

    StepNodes inputs = new StepNodes();
    inputs.addNode( "previousStep", "xml", node );
    doReturn( inputs ).when( analyzer ).getInputs();

    Set<ComponentDerivationRecord> changeRecords = analyzer.getChangeRecords( meta );
    assertNotNull( changeRecords );
    assertEquals( 2, changeRecords.size() );
  }