GeoServerActionConfiguration extends GeoServerActionConfig implements Cloneable { @Override public GeoServerActionConfiguration clone() { final GeoServerActionConfiguration configuration = (GeoServerActionConfiguration) super .clone(); return configuration; } GeoServerActionConfiguration(String id, String name, String description); String getCrs(); void setCrs(String crs); String getEnvelope(); void setEnvelope(String envelope); String getStoreFilePrefix(); void setStoreFilePrefix(String storeFilePrefix); List<String> getStyles(); void setStyles(List<String> styles); String getConfigId(); void setConfigId(String configId); String getDatatype(); void setDatatype(String datatype); final String getLayerName(); final void setLayerName(String layerName); String getTitle(); void setTitle(String title); Boolean getQueryable(); String getLayerAbstract(); void setQueryable(Boolean queryable); String getLayerDescription(); void setLayerDescription(String layerDescription); void setLayerAbstract(String layerAbstract); String getDefaultNamespace(); void setDefaultNamespace(String defaultNamespace); String getDefaultNamespaceUri(); void setDefaultNamespaceUri(String defaultNamespaceUri); String getDefaultStyle(); void setDefaultStyle(String defaultStyle); String getWmsPath(); void setWmsPath(String wmsPath); String getDataTransferMethod(); void setDataTransferMethod(String dataTransferMethod); @Override GeoServerActionConfiguration clone(); String getStoreName(); void setStoreName(String storeName);  }
@Test public void cloneTest(){ GeoServerActionConfiguration config=new GeoServerActionConfiguration("id", "name", "desc"); GeoServerActionConfiguration configCloned=config.clone(); assertEquals(config,configCloned); assertTrue(config!=configCloned); assertTrue(config.getClass()==configCloned.getClass()); }