@Test
public void testCalcSimilarityWithDiff() throws Exception {

	BufferedImage image1 = ImageIO.read(getClass().getResource("hifive_logo.png"));
	BufferedImage image2 = ImageIO.read(getClass().getResource("hifive_logo_similar.png"));
	Rectangle rectangle = new Rectangle(0, 0, image1.getWidth(), image1.getHeight());
	ComparedRectangleArea similarRectangle = new ComparedRectangleArea(rectangle);
	Offset offset = new Offset(0, 0);
	// expectedの値はhifive_logo.pngとhifive_logo_similar.pngの類似度を事前に計算したSimilarityUtils.calcSimilarityの結果を使用
	SimilarityUnit unit;
	double actual;
	unit = SimilarityUtils.calcSimilarity(image1, image2, rectangle, similarRectangle, offset);
	actual = unit.getSimilarityThresDiff();
	assertThat(actual, is(0.97));
	unit = SimilarityUtils.calcSimilarity(image1, image2, rectangle, similarRectangle, offset, 1.0);
	actual = unit.getSimilarityThresDiff();
	assertThat(actual, is(0.97));
}