public Object clone() {
    XMLOutputMeta retval = (XMLOutputMeta) super.clone();
    int nrfields = outputFields.length;

    retval.allocate( nrfields );

    for ( int i = 0; i < nrfields; i++ ) {
      retval.outputFields[i] = (XMLField) outputFields[i].clone();
    }

    return retval;
  }
@Test
  public void testClone() throws Exception {
    XMLOutputMeta xmlOutputMeta = new XMLOutputMeta();
    Node stepnode = getTestNode();
    DatabaseMeta dbMeta = mock( DatabaseMeta.class );
    IMetaStore metaStore = mock( IMetaStore.class );
    xmlOutputMeta.loadXML( stepnode, Collections.singletonList( dbMeta ), metaStore );
    XMLOutputMeta cloned = (XMLOutputMeta) xmlOutputMeta.clone();
    assertNotSame( cloned, xmlOutputMeta );
    assertXmlOutputMeta( cloned );
  }