### Question:
Operator { public final Product getTargetProduct() throws OperatorException { return context.getTargetProduct(); } protected  Operator(); abstract void initialize(); void update(); void computeTile(Band targetBand, Tile targetTile, ProgressMonitor pm); void computeTileStack(Map<Band, Tile> targetTiles, Rectangle targetRectangle, ProgressMonitor pm); void dispose(); final String getId(); final Product[] getSourceProducts(); final void setSourceProducts(Product... products); Product getSourceProduct(); void setSourceProduct(Product sourceProduct); final Product getSourceProduct(String id); final void setSourceProduct(String id, Product product); final String getSourceProductId(Product product); final Product getTargetProduct(); final Object getTargetProperty(String name); Object getParameter(String name); void setParameter(String name, Object value); final Tile getSourceTile(RasterDataNode rasterDataNode, Rectangle region); final Tile getSourceTile(RasterDataNode rasterDataNode,
                                    Rectangle region,
                                    BorderExtender borderExtender); void cancel(); final Logger getLogger(); void stopTileComputationObservation(); final void setLogger(Logger logger); final OperatorSpi getSpi(); final void setSpi(OperatorSpi operatorSpi); @Deprecated final Tile getSourceTile(RasterDataNode rasterDataNode, Rectangle region, ProgressMonitor pm); @Deprecated final Tile getSourceTile(RasterDataNode rasterDataNode,
                                    Rectangle region,
                                    BorderExtender borderExtender,
                                    ProgressMonitor pm);  }### Answer:
@Test public void testThatGetTargetProductMustNotBeCalledFromInitialize() { Operator op = new Operator() { @Override public void initialize() throws OperatorException { getTargetProduct(); } }; try { op.getTargetProduct(); fail("RuntimeException expected: Operator shall not allow calling getTargetProduct() from within initialize()."); } catch (OperatorException ignored) { fail("RuntimeException expected: Operator shall not allow calling getTargetProduct() from within initialize()."); } catch (RuntimeException ignored) { } }