@Test
public void testConfigureTargetProduct() {

    final TestProductConfigurer productConfigurer = new TestProductConfigurer();
    mphChlOp.configureTargetProduct(productConfigurer);
    final Product targetProduct = productConfigurer.getTargetProduct();
    assertNotNull(targetProduct);
    final Band chlBand = targetProduct.getBand("chl");
    assertNotNull(chlBand);
    assertEquals(ProductData.TYPE_FLOAT32, chlBand.getDataType());
    assertEquals("mg/m^3", chlBand.getUnit());
    assertEquals(Double.NaN, chlBand.getGeophysicalNoDataValue(), 1e-8);
    final Band immersed_cyanobacteriaBand = targetProduct.getBand("immersed_cyanobacteria");
    assertNotNull(immersed_cyanobacteriaBand);
    assertEquals(ProductData.TYPE_INT8, immersed_cyanobacteriaBand.getDataType());
    final Band floating_cyanobacteriaBand = targetProduct.getBand("floating_cyanobacteria");
    assertNotNull(floating_cyanobacteriaBand);
    assertEquals(ProductData.TYPE_INT8, floating_cyanobacteriaBand.getDataType());
    final Band floating_vegetationBand = targetProduct.getBand("floating_vegetation");
    assertNotNull(floating_vegetationBand);
    assertEquals(ProductData.TYPE_INT8, floating_vegetationBand.getDataType());
    final Band flagBand = targetProduct.getBand("mph_chl_flags");
    Assert.assertNotNull(flagBand);
    assertEquals(ProductData.TYPE_INT8, flagBand.getDataType());
    assertTrue(productConfigurer.isCopyGeoCodingCalled());
    final FlagCoding flagCoding = targetProduct.getFlagCodingGroup().get("mph_chl_flags");
    assertNotNull(flagCoding);
    FlagCoding bandFlagcoding = flagBand.getFlagCoding();
    assertSame(flagCoding, bandFlagcoding);
    final MetadataAttribute cyanoFlag = flagCoding.getFlag("mph_cyano");
    assertEquals("mph_cyano", cyanoFlag.getName());
    assertEquals("Cyanobacteria dominated waters", cyanoFlag.getDescription());
    assertEquals(1, cyanoFlag.getData().getElemInt());
    final MetadataAttribute floatingFlag = flagCoding.getFlag("mph_floating");
    assertNotNull(floatingFlag);
    assertEquals("mph_floating", floatingFlag.getName());
    assertEquals("Floating vegetation or cyanobacteria on water surface", floatingFlag.getDescription());
    assertEquals(2, floatingFlag.getData().getElemInt());
    final MetadataAttribute adjacencyFlag = flagCoding.getFlag("mph_adjacency");
    assertNotNull(adjacencyFlag);
    assertEquals("mph_adjacency", adjacencyFlag.getName());
    assertEquals("Pixel suspect of adjacency effects", adjacencyFlag.getDescription());
    assertEquals(4, adjacencyFlag.getData().getElemInt());
    final ProductNodeGroup<Mask> maskGroup = targetProduct.getMaskGroup();
    assertNotNull(maskGroup);
    final Mask cyanoMask = maskGroup.get("mph_cyano");
    assertNotNull(cyanoMask);
    assertEquals("Cyanobacteria dominated waters", cyanoMask.getDescription());
    assertEquals(Color.cyan, cyanoMask.getImageColor());
    assertEquals(0.5f, cyanoMask.getImageTransparency(), 1e-8);
    final Mask floatingMask = maskGroup.get("mph_floating");
    assertNotNull(floatingMask);
    assertEquals("Floating vegetation or cyanobacteria on water surface", floatingMask.getDescription());
    assertEquals(Color.green, floatingMask.getImageColor());
    assertEquals(0.5f, floatingMask.getImageTransparency(), 1e-8);
    final Mask adjacencyMask = maskGroup.get("mph_adjacency");
    assertNotNull(adjacencyMask);
    assertEquals("Pixel suspect of adjacency effects", adjacencyMask.getDescription());
    assertEquals(Color.red, adjacencyMask.getImageColor());
    assertEquals(0.5f, adjacencyMask.getImageTransparency(), 1e-8);
}