change type of rootDirectory to Path
adjusted the way FileManagerTest does setup