@Test
  public void testRender() {
    BasicImageTransformations.Builder builder = new BasicImageTransformations.Builder();
    builder.setFlipHorizontal(true);
    builder.setFlipVertical(true);
    builder.setOffset(5.0, 6.0);
    builder.setRotateInRadians(Math.PI / 6.0);
    builder.setZoomX(3.0);
    builder.setZoomY(4.0);
    BasicImageTransformations transf = builder.create();

    for (InterpolationType interpolation : InterpolationType.values()) {
      AffineTransform affinTransf = AffineTransformationStep.getTransformationMatrix(transf);

      AffineTransformationStep transformer1 =
          new AffineTransformationStep(transf, Color.GRAY, interpolation);
      AffineTransformationStep transformer2 =
          new AffineTransformationStep(affinTransf, Color.GRAY, interpolation);
      // Test that it does not affect transformer2
      affinTransf.translate(1000.0, 1000.0);

      int srcWidth = 20;
      int srcHeight = 30;
      int destWidth = 110;
      int destHeight = 120;
      BufferedImage srcImage = new BufferedImage(srcWidth, srcHeight, BufferedImage.TYPE_BYTE_GRAY);
      TransformedImage inputImage = new TransformedImage(srcImage, null);
      TransformationStepInput input =
          new TransformationStepInput(null, destWidth, destHeight, inputImage);

      AffineTransform expectedTransf =
          AffineTransformationStep.getTransformationMatrix(
              transf, srcWidth, srcHeight, destWidth, destHeight);
      ImagePointTransformer expectedPointTransf = new AffineImagePointTransformer(expectedTransf);

      testConvertData(transformer1, input, expectedPointTransf);
      testConvertData(transformer2, input, expectedPointTransf);

      assertNotNull(transformer1.toString());
      assertNotNull(transformer2.toString());
    }
  }
  @Test
  public void testProperties2() {
    Color bckgColor = new Color(1, 2, 3, 4);
    BasicImageTransformations affine = BasicImageTransformations.newRotateTransformation(3.0);
    AffineTransform expectedAffine = AffineTransformationStep.getTransformationMatrix(affine);
    for (InterpolationType interpolation : InterpolationType.values()) {
      AffineTransformationStep transf =
          new AffineTransformationStep(affine, bckgColor, interpolation);

      assertSame(bckgColor, transf.getBackgroundColor());
      assertSame(interpolation, transf.getInterpolationType());
      PointTransformerChecks.checkEqualPointTransformers(
          new AffineImagePointTransformer(expectedAffine),
          new AffineImagePointTransformer(transf.getTransformations()));
    }
  }