### Question:
RowMeta implements IRowMeta { @Override public void mergeRowMeta( IRowMeta r ) { mergeRowMeta( r, null ); } RowMeta(); private  RowMeta( RowMeta rowMeta, Integer targetType ); private  RowMeta( List<IValueMeta> valueMetaList, RowMetaCache rowMetaCache );  RowMeta( DataInputStream inputStream );  RowMeta( Node node ); @Override RowMeta clone(); @Override IRowMeta cloneToType( int targetType ); @Override String toString(); @Override List<IValueMeta> getValueMetaList(); @Override void setValueMetaList( List<IValueMeta> valueMetaList ); @Override int size(); @Override boolean isEmpty(); @Override boolean exists( IValueMeta meta ); @Override void addValueMeta( IValueMeta meta ); @Override void addValueMeta( int index, IValueMeta meta ); @Override IValueMeta getValueMeta( int index ); @Override void setValueMeta( int index, IValueMeta valueMeta ); @Override String getString( Object[] dataRow, int index ); @Override Long getInteger( Object[] dataRow, int index ); @Override Double getNumber( Object[] dataRow, int index ); @Override Date getDate( Object[] dataRow, int index ); @Override BigDecimal getBigNumber( Object[] dataRow, int index ); @Override Boolean getBoolean( Object[] dataRow, int index ); @Override byte[] getBinary( Object[] dataRow, int index ); @Override boolean isNull( Object[] dataRow, int index ); @Override Object[] cloneRow( Object[] objects ); @Override Object[] cloneRow( Object[] objects, Object[] newObjects ); @Override String getString( Object[] dataRow, String valueName, String defaultValue ); @Override Long getInteger( Object[] dataRow, String valueName, Long defaultValue ); @Override Date getDate( Object[] dataRow, String valueName, Date defaultValue ); @Override int indexOfValue( String valueName ); @Override IValueMeta searchValueMeta( String valueName ); @Override void addRowMeta( IRowMeta rowMeta ); @Override void mergeRowMeta( IRowMeta r ); @Override void mergeRowMeta( IRowMeta r, String originTransformName ); @Override String[] getFieldNames(); @Override void writeData( DataOutputStream outputStream, Object[] data ); @Override void writeMeta( DataOutputStream outputStream ); @Override Object[] readData( DataInputStream inputStream ); @Override void clear(); @Override void removeValueMeta( String valueName ); @Override void removeValueMeta( int index ); @Override String toStringMeta(); @Override String getString( Object[] row ); @Override String[] getFieldNamesAndTypes( int maxlen ); @Override int compare( Object[] rowData1, Object[] rowData2, int[] fieldnrs ); @Override boolean equals( Object[] rowData1, Object[] rowData2, int[] fieldnrs ); @Override int compare( Object[] rowData1, Object[] rowData2, int[] fieldnrs1, int[] fieldnrs2 ); @Override int compare( Object[] rowData1, IRowMeta rowMeta2, Object[] rowData2, int[] fieldnrs1,
                      int[] fieldnrs2 ); @Override int compare( Object[] rowData1, Object[] rowData2 ); @Override @Deprecated int oldXORHashCode( Object[] rowData ); @Override int hashCode( Object[] rowData ); @Override int convertedValuesHashCode( Object[] rowData ); static byte[] extractData( IRowMeta metadata, Object[] row ); static Object[] getRow( IRowMeta metadata, byte[] data ); @Override String getMetaXml(); @Override String getDataXml(Object[] rowData ); @Override Object[] getRow( Node node ); static final String XML_META_TAG; static final String XML_DATA_TAG; }### Answer:
@Test public void testMergeRowMeta() throws HopPluginException { List<IValueMeta> list = this.generateVList( new String[] { "phobos", "demos", "mars" }, new int[] { 6, 6, 6 } ); list.add( 1, integer ); RowMeta toMerge = new RowMeta(); toMerge.setValueMetaList( list ); rowMeta.mergeRowMeta( toMerge ); assertEquals( 7, rowMeta.size() ); list = rowMeta.getValueMetaList(); assertTrue( list.contains( integer ) ); IValueMeta found = null; for ( IValueMeta vm : list ) { if ( vm.getName().equals( "integer_1" ) ) { found = vm; break; } } assertNotNull( found ); }