@Test(expected = IllegalArgumentException.class)
public void dirFactoryInvalidDirectory() {

    when(directory.isDirectory()).thenReturn(Boolean.FALSE);
    FileOrDirectoryTaskOutput.directory(directory);
}