@Test
public void testForceResizeCrop() throws IOException {

	// tests with horizontal input ...
	BufferedImage biH = ImageTestUtil.readImage("testgrid-horizontal-hd_1920x1080.png");
	// .. to horizontal output
	BufferedImage outputImage1 = manipulator.cropAndResize(biH,
		new ImageManipulationParametersImpl().setWidth(500).setHeight(200).setRect(0, 0, 540, 960).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));//
	assertThat(outputImage1).matchesReference("outputImage1-force-crop-reference.png");
	// .. to vertical output
	BufferedImage outputImage2 = manipulator.cropAndResize(biH,
		new ImageManipulationParametersImpl().setWidth(200).setHeight(500).setRect(0, 0, 540, 960).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage2).matchesReference("outputImage2-force-crop-reference.png");
	// .. to square output
	BufferedImage outputImage3 = manipulator.cropAndResize(biH,
		new ImageManipulationParametersImpl().setWidth(500).setHeight(500).setRect(0, 0, 540, 960).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage3).matchesReference("outputImage3-force-crop-reference.png");
	// tests with vertical input ...
	BufferedImage biV = ImageTestUtil.readImage("testgrid-vertical-hd_1080x1920.png");
	// .. to horizontal output
	BufferedImage outputImage4 = manipulator.cropAndResize(biV,
		new ImageManipulationParametersImpl().setWidth(500).setHeight(200).setRect(0, 0, 960, 540).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage4).matchesReference("outputImage4-force-crop-reference.png");
	// .. to vertical output
	BufferedImage outputImage5 = manipulator.cropAndResize(biV,
		new ImageManipulationParametersImpl().setWidth(200).setHeight(500).setRect(0, 0, 960, 540).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage5).matchesReference("outputImage5-force-crop-reference.png");
	// .. to square output
	BufferedImage outputImage6 = manipulator.cropAndResize(biV,
		new ImageManipulationParametersImpl().setWidth(500).setHeight(500).setRect(0, 0, 960, 540).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage6).matchesReference("outputImage6-force-crop-reference.png");
	// tests with square input ...
	BufferedImage biS = ImageTestUtil.readImage("testgrid-square_1080x1080.png");
	// .. to horizontal output
	BufferedImage outputImage7 = manipulator.cropAndResize(biS,
		new ImageManipulationParametersImpl().setWidth(500).setHeight(200).setRect(0, 0, 540, 540).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage7).matchesReference("outputImage7-force-crop-reference.png");
	// .. to vertical output
	BufferedImage outputImage8 = manipulator.cropAndResize(biS,
		new ImageManipulationParametersImpl().setWidth(200).setHeight(500).setRect(0, 0, 540, 540).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage8).matchesReference("outputImage8-force-crop-reference.png");
	// .. to square output
	BufferedImage outputImage9 = manipulator.cropAndResize(biS,
		new ImageManipulationParametersImpl().setWidth(500).setHeight(500).setRect(0, 0, 540, 540).setCropMode(CropMode.RECT)
			.setResizeMode(ResizeMode.FORCE));
	assertThat(outputImage9).matchesReference("outputImage9-force-crop-reference.png");
	// when you want to update the referenceImage, execute the code below
	// and copy the files to src/test/resources/references/
	// ImageTestUtil.writePngImage(outputImage9, new File("target/outputImage9-force-crop-reference.png"));
}