@Override
  public Set<String> getOutputResourceFields( XMLOutputMeta meta ) {
    Set<String> fields = new HashSet<>();
    XMLField[] outputFields = meta.getOutputFields();
    for ( int i = 0; i < outputFields.length; i++ ) {
      XMLField outputField = outputFields[ i ];
      fields.add( outputField.getFieldName() );
    }
    return fields;
  }
@Test
  public void testGetOutputResourceFields() throws Exception {
    XMLField[] outputFields = new XMLField[2];
    XMLField field1 = mock( XMLField.class );
    XMLField field2 = mock( XMLField.class );
    outputFields[0] = field1;
    outputFields[1] = field2;

    when( field1.getFieldName() ).thenReturn( "field1" );
    when( field2.getFieldName() ).thenReturn( "field2" );

    when( meta.getOutputFields() ).thenReturn( outputFields );

    Set<String> outputResourceFields = analyzer.getOutputResourceFields( meta );

    assertEquals( outputFields.length, outputResourceFields.size() );
    for ( XMLField outputField : outputFields ) {
      assertTrue( outputResourceFields.contains( outputField.getFieldName() ) );
    }
  }