@Test
public void testCompareShiftFailed() throws Exception {

	BufferedImage expectedImage = ImageIO
			.read(getClass().getResource("CategoryImageComparatorTest_shift_expected.png"));
	Rectangle expectedRectangle = new Rectangle(0, 0, expectedImage.getWidth(), expectedImage.getHeight());
	// shiftの差分とtextの差分がある画像
	BufferedImage actualImage = ImageIO
			.read(getClass().getResource("CategoryImageComparatorTest_shift_actual_failed.png"));
	Rectangle actualRectangle = new Rectangle(0, 0, actualImage.getWidth(), actualImage.getHeight());
	// shiftの差分を容認するカテゴリ比較を行うComparatorを作成
	DiffCategory[] acceptCategories = new DiffCategory[] { DiffCategory.SHIFT };
	CategoryComparisonParameters parameters = new CategoryComparisonParameters(acceptCategories);
	CompareOption option = new CompareOption(CompareOptionType.CATEGORY, parameters);
	CategoryImageComparator categoryImageComparator = new CategoryImageComparator(
			(CategoryComparisonParameters) option.getParameters());
	CategoryImageComparedResult result = (CategoryImageComparedResult) categoryImageComparator
			.compare(expectedImage, expectedRectangle, actualImage, actualRectangle);
	assertThat(result.isSucceeded(), is(false));
	assertThat(result.getComparedRectangles().size(), is(2));
	assertThat(result.getComparedRectangles().get(0).getCategory(), is(DiffCategory.TEXT));
	assertThat(result.getComparedRectangles().get(1).getCategory(), is(DiffCategory.SHIFT));
}