@Override
  protected Set<StepField> getUsedFields( GetXMLDataMeta meta ) {
    Set<StepField> usedFields = new HashSet<>();
    if ( meta.isInFields() ) {
      Set<StepField> stepFields = createStepFields( meta.getXMLField(), getInputs() );
      usedFields.addAll( stepFields );
    }
    return usedFields;
  }
@Test
  public void testGetUsedFields() throws Exception {
    when( meta.isInFields() ).thenReturn( true );
    when( meta.getXMLField() ).thenReturn( "xml" );

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

    Set<StepField> usedFields = analyzer.getUsedFields( meta );
    assertEquals( 1, usedFields.size() );
    assertEquals( "xml", usedFields.iterator().next().getFieldName() );
  }