@Test
public void testFormat_selector() throws Exception {

	PtlCapabilities capabilities = new PtlCapabilities(new HashMap<String, Object>());
	capabilities.setPlatform(Platform.WINDOWS);
	capabilities.setBrowserName("firefox");
	capabilities.setVersion("38");
	PersistMetadata metadata = new PersistMetadata("testId", "testClass", "testMethod", "scId",
			new IndexDomSelector(SelectorType.TAG_NAME, "body", 1), null, capabilities);
	FileNameFormatter formatter = new FileNameFormatter(
			"{platformName}_{platformVersion}_{browserName}_{version}_{screenArea}.png");
	String result = formatter.format(metadata);
	assertThat(result, is("testMethod_scId_WINDOWS_firefox_38_TAG_NAME_body_[1].png"));
}