@Test
public void testSaveScreenshot_rectangle() throws Exception {

	Map<String, Object> map = new HashMap<String, Object>();
	map.put("platform", "WINDOWS");
	map.put("browserName", "firefox");
	map.put("version", "38");
	PtlCapabilities capabilities = new PtlCapabilities(map);
	RectangleArea rectangle = new RectangleArea(0d, 10d, 100d, 110d);
	PersistMetadata metadata = new PersistMetadata("testId", "testClass", "testMethod", "scId", null, rectangle,
			capabilities);
	BufferedImage expected = ImageIO.read(getClass().getResource("FilePersister_Image.png"));
	persister.saveScreenshot(metadata, expected);
	File file = new File(BASE_DIRECTORY
			+ "/testId/testClass/testMethod_scId_WINDOWS_firefox_38_rect_0_10_100_110.png");
	BufferedImage actual = ImageIO.read(file);
	assertArrayEquals(toRGB(expected), toRGB(actual));
}