### Question:
ForestCoverChangeOp extends Operator { public ForestCoverChangeOp() { super(); } ForestCoverChangeOp(); @Override void initialize(); @Override void doExecute(ProgressMonitor pm); static boolean isSentinelProduct(Product product);  }### Answer:
@Test public void testForestCoverChangeOp() throws Exception { ProductReaderPlugIn productReaderPlugIn = buildDimapProductReaderPlugIn(); File currentProductFile = this.forestCoverChangeTestsFolderPath.resolve("S2A_R093_T35UMP_20170628T092026.dim").toFile(); Product currentSourceProduct = productReaderPlugIn.createReaderInstance().readProductNodes(currentProductFile, null); File previousProductFile = this.forestCoverChangeTestsFolderPath.resolve("S2A_20160713T125925_A005524_T35UMP.dim").toFile(); Product previousSourceProduct = productReaderPlugIn.createReaderInstance().readProductNodes(previousProductFile, null); Map<String, Object> parameters = new HashMap<>(); parameters.put("forestCoverPercentage", 95.0f); parameters.put("totalIterationsForSecondSegmentation", 10); parameters.put("regionMergingCriterion", GenericRegionMergingOp.LOCAL_MUTUAL_BEST_FITTING_REGION_MERGING_CRITERION); parameters.put("shapeWeight", 0.5f); parameters.put("spectralWeight", 0.5f); parameters.put("threshold", 5.0f); parameters.put("mergingCostCriterion", GenericRegionMergingOp.BAATZ_SCHAPE_MERGING_COST_CRITERION); parameters.put("degreesOfFreedom", 4.0d); Map<String, Product> sourceProducts = new HashMap<String, Product>(); sourceProducts.put("recentProduct", currentSourceProduct); sourceProducts.put("previousProduct", previousSourceProduct); Operator operator = GPF.getDefaultInstance().createOperator("ForestCoverChangeOp", parameters, sourceProducts, null); operator.execute(ProgressMonitor.NULL); Product targetProduct = operator.getTargetProduct(); assertNotNull(targetProduct); assertEquals(549, targetProduct.getSceneRasterWidth()); assertEquals(549, targetProduct.getSceneRasterHeight()); assertEquals(1, targetProduct.getNumBands()); Band band = targetProduct.getBandAt(0); assertNotNull(band); assertEquals(ProductData.TYPE_INT32, band.getDataType()); long size = targetProduct.getSceneRasterWidth() * targetProduct.getSceneRasterHeight(); assertEquals(size, band.getNumDataElems()); checkBand(band); }