@Test
public void addsNestedDirectoriesAndFiles() {
additionService.clearImport();
PollableChannel additionChannel = additionService.libraryAdditionChannel;
additionChannel.send(msg(dir2, new HashSet<String>(), set(file2a)));
additionChannel.send(msg(dir1, set(dir2), set(file1a, file1b)));
additionChannel.send(msg(null, set(dir1), new HashSet<File>()));
additionChannel.send(FINISHED_MESSAGE);
additionService.receive();
additionService.updateLibrary();
assertEquals(set(file1a, file1b), presenceDao.getFiles(dir1));