props.setProperty("directory", directory.getAbsolutePath());
DirectoryResourceModelSource.Configuration config = new DirectoryResourceModelSource.Configuration(props);
final DirectoryResourceModelSource directoryNodesProvider = new DirectoryResourceModelSource(getFrameworkInstance());
directoryNodesProvider.configure(config);
final INodeSet nodes = directoryNodesProvider.getNodes();
assertNotNull(nodes);
assertEquals(3, nodes.getNodes().size());
assertNotNull(nodes.getNode("test1"));
assertNotNull(nodes.getNode("test2"));
assertNotNull(nodes.getNode("test3"));
assertEquals("A description", nodes.getNode("test1").getDescription());
assertEquals("B description", nodes.getNode("test2").getDescription());
assertEquals("C description", nodes.getNode("test3").getDescription());
//change modification time of a file
assertTrue(file1.setLastModified(System.currentTimeMillis()));
final INodeSet nodes2 = directoryNodesProvider.getNodes();
assertNotNull(nodes2);
assertEquals(3, nodes2.getNodes().size());
assertNotNull(nodes2.getNode("test1"));
assertNotNull(nodes2.getNode("test2"));
assertNotNull(nodes2.getNode("test3"));
assertEquals("A description", nodes2.getNode("test1").getDescription());
assertEquals("B description", nodes2.getNode("test2").getDescription());
assertEquals("C description", nodes2.getNode("test3").getDescription());
FileUtils.deleteDir(directory);
}