@Test
public void testConvertSizeDiffPointsToAreas() throws Exception {

	BufferedImage image1 = ImageIO
			.read(getClass().getResource("ImageUtilsTest_convert_size_diff_points_to_areas_expected.png"));
	Rectangle rectangle1 = new Rectangle(0, 0, image1.getWidth(), image1.getHeight());
	BufferedImage image2 = ImageIO
			.read(getClass().getResource("ImageUtilsTest_convert_size_diff_points_to_areas_actual.png"));
	Rectangle rectangle2 = new Rectangle(0, 0, image2.getWidth(), image2.getHeight());
	ImageComparedResult result = new DefaultImageComparator().compare(image1, rectangle1, image2, rectangle2);
	List<Point> sizeDiffPoints = ((DiffPoints) result).getSizeDiffPoints();
	// ImageUtils.convertSizeDiffPointsToAreas内の計算でRectangleを作成するときrectMargin3で計算しているので、expectedの値もrectMarginを考慮
	int startX = 21;
	int startY = 21;
	int endX = 30;
	int endY = 30;
	int rectMargin = 3;
	List<Rectangle> expected = new ArrayList<Rectangle>();
	// 右側の四角形
	expected.add(new Rectangle(startX, 0, endX - startX, endY));
	// 下側の四角形
	expected.add(
			new Rectangle(-rectMargin, startY - rectMargin, endX + rectMargin * 2, endY - startY + rectMargin * 2));
	List<Rectangle> actual = ImageUtils.convertSizeDiffPointsToAreas(sizeDiffPoints);
	assertThat(actual, is(expected));
}