@Test
public void testSaveTargetResults() throws Exception {

	List<TargetResult> expected = JSONUtils.readValue(
			getClass().getResourceAsStream("FilePersister_TargetResults.json"),
			new TypeReference<List<TargetResult>>() {
			});
	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);
	PersistMetadata metadata = new PersistMetadata("testId", "testClass", "testMethod", "scId", capabilities);
	persister.saveTargetResults(metadata, expected);
	File file = new File(BASE_DIRECTORY + "/testId/testClass/testMethod_scId_WINDOWS_firefox_38.json");
	List<TargetResult> result = JSONUtils.readValue(file, new TypeReference<List<TargetResult>>() {
	});
	assertThat(result, is(expected));
}