MetadataCol52 extends DTColumnConfig52 { public MetadataCol52 cloneColumn() { MetadataCol52 cloned = new MetadataCol52(); cloned.setMetadata( getMetadata() ); cloned.cloneCommonColumnConfigFrom( this ); return cloned; }  String getMetadata(); void setMetadata( String metadata ); @Override List<BaseColumnFieldDiff> diff( BaseColumn otherColumn ); MetadataCol52 cloneColumn(); @Override boolean equals(Object o); @Override int hashCode(); static final String FIELD_METADATA; }
@Test public void testCloneColumn() { column1.setWidth(10); MetadataCol52 clone = column1.cloneColumn(); assertEquals(column1.getMetadata(), clone.getMetadata()); assertEquals(column1.getHeader(), clone.getHeader()); assertEquals(column1.getWidth(), clone.getWidth()); assertEquals(column1.isHideColumn(), clone.isHideColumn()); assertEquals(column1.getDefaultValue(), clone.getDefaultValue()); }