ExportParameter { public ExportParameter getClone() { final ExportParameter clone = new ExportParameter(); clone.setUseSelectedProduct(useSelectedProduct); clone.setSourceDirectory(new File(sourceDirectory.getPath())); clone.setOpenFileDialog(openFileDialog); clone.setRecursive(recursive); clone.setRoiType(roiType); clone.setGeometry(geometry); clone.setNorth(north); clone.setSouth(south); clone.setEast(east); clone.setWest(west); clone.setTargetFile(new File(targetFile.getPath())); clone.setExportFormat(exportFormat); return clone; }  void setUseSelectedProduct(boolean useSelectedProduct); boolean isUseSelectedProduct(); void setSourceDirectory(File sourceDirectory); File getSourceDirectory(); void setOpenFileDialog(boolean openFileDialog); boolean isOpenFileDialog(); void setRecursive(boolean recursive); boolean isRecursive(); void setRoiType(int roiType); int getRoiType(); VectorDataNode getGeometry(); void setGeometry(VectorDataNode geometry); void setNorth(double north); double getNorth(); void setSouth(double south); double getSouth(); void setEast(double east); double getEast(); void setWest(double west); double getWest(); void setTargetFile(File targetFile); File getTargetFile(); void setExportFormat(String exportFormat); String getExportFormat(); ExportParameter getClone();  }
@Test public void testGetClone() { final File sourceDirectory = new File("source/dir"); final File targetFile = new File("target/file"); exportParameter.setUseSelectedProduct(true); exportParameter.setSourceDirectory(sourceDirectory); exportParameter.setOpenFileDialog(true); exportParameter.setRecursive(true); exportParameter.setRoiType(6); exportParameter.setNorth(7.1); exportParameter.setSouth(8.2); exportParameter.setEast(9.3); exportParameter.setWest(10.4); exportParameter.setTargetFile(targetFile); exportParameter.setExportFormat("word"); final ExportParameter clone = exportParameter.getClone(); assertNotNull(clone); assertNotSame(clone, exportParameter); assertEquals(exportParameter.isUseSelectedProduct(), clone.isUseSelectedProduct()); assertEquals(sourceDirectory.getPath(), clone.getSourceDirectory().getPath()); assertEquals(exportParameter.isOpenFileDialog(), clone.isOpenFileDialog()); assertEquals(exportParameter.isRecursive(), clone.isRecursive()); assertEquals(exportParameter.getRoiType(), clone.getRoiType()); assertEquals(exportParameter.getNorth(), clone.getNorth(), 1e-8); assertEquals(exportParameter.getSouth(), clone.getSouth(), 1e-8); assertEquals(exportParameter.getEast(), clone.getEast(), 1e-8); assertEquals(exportParameter.getWest(), clone.getWest(), 1e-8); assertEquals(targetFile.getPath(), clone.getTargetFile().getPath()); assertEquals(exportParameter.getExportFormat(), clone.getExportFormat()); }