// We read all sources and add the first property key to a hash set.
// As all the source files only have one key equal to the base filename
// we can make sure we have read the expected files correctly.
Set<String> resultKeys = new HashSet<String>();
assertTrue(fileSourceProvider.hasNext());
Source source = fileSourceProvider.next();
assertEquals(2, source.getRootElement().getChildren("file").size());
Object key = source.getRootElement()
.getChildren("file").get(0)
.getChild("properties")
.getChild("entry")
.getAttribute("key");
resultKeys.add((String) key);
key = source.getRootElement()
.getChildren("file").get(1)
.getChild("properties")
.getChild("entry")
.getAttribute("key");
resultKeys.add((String) key);
Set<String> expectedKeys = new HashSet<String>();
expectedKeys.add("1");
expectedKeys.add("11");
assertEquals(expectedKeys, resultKeys);
Set<String> resultPaths = new HashSet<String>();
String expectedPath = (String) source.getRootElement()
.getChildren("file").get(0).getAttribute("path");
expectedPath = expectedPath.replace('\\', '/');
resultPaths.add(expectedPath);
expectedPath = (String) source.getRootElement()
.getChildren("file").get(1).getAttribute("path");
expectedPath = expectedPath.replace('\\', '/');
resultPaths.add(expectedPath);
Set<String> expectedPaths = new HashSet<String>();
expectedPaths.add("src/test/file/./1.properties");