### Question:
MultiMergeJoinMeta extends BaseStepMeta implements StepMetaInterface { @Override public Object clone() { MultiMergeJoinMeta retval = (MultiMergeJoinMeta) super.clone(); int nrKeys = keyFields == null ? 0 : keyFields.length; int nrSteps = inputSteps == null ? 0 : inputSteps.length; retval.allocateKeys( nrKeys ); retval.allocateInputSteps( nrSteps ); System.arraycopy( keyFields, 0, retval.keyFields, 0, nrKeys ); System.arraycopy( inputSteps, 0, retval.inputSteps, 0, nrSteps ); return retval; } MultiMergeJoinMeta(); String getJoinType(); void setJoinType( String joinType ); String[] getKeyFields(); void setKeyFields( String[] keyFields ); @Override boolean excludeFromRowLayoutVerification(); @Override void loadXML( Node stepnode, List<DatabaseMeta> databases, IMetaStore metaStore ); void allocateKeys( int nrKeys ); @Override Object clone(); @Override String getXML(); @Override void setDefault(); @Override void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ); @Override void searchInfoAndTargetSteps( List<StepMeta> steps ); @Override void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ); @Override void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta, RowMetaInterface prev,
      String[] input, String[] output, RowMetaInterface info, VariableSpace space, Repository repository,
      IMetaStore metaStore ); @Override void getFields( RowMetaInterface r, String name, RowMetaInterface[] info, StepMeta nextStep,
      VariableSpace space, Repository repository, IMetaStore metaStore ); @Override StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr, TransMeta tr,
      Trans trans ); @Override StepDataInterface getStepData(); @Override void resetStepIoMeta(); void setInputSteps( String[] inputSteps ); String[] getInputSteps(); void allocateInputSteps( int count ); static final String[] join_types; static final boolean[] optionals; }### Answer:
@Test public void cloneTest() throws Exception { MultiMergeJoinMeta meta = new MultiMergeJoinMeta(); meta.allocateKeys( 2 ); meta.allocateInputSteps( 3 ); meta.setKeyFields( new String[] { "key1", "key2" } ); meta.setInputSteps( new String[] { "step1", "step2", "step3" } ); meta.setJoinType( "INNER" ); MultiMergeJoinMeta aClone = (MultiMergeJoinMeta) meta.clone(); Assert.assertFalse( aClone == meta ); Assert.assertTrue( Arrays.equals( meta.getKeyFields(), aClone.getKeyFields() ) ); Assert.assertTrue( Arrays.equals( meta.getInputSteps(), aClone.getInputSteps() ) ); Assert.assertEquals( meta.getJoinType(), aClone.getJoinType() ); }