@Test
public void testIsValidDirectory() {

  File file = Mockito.mock(File.class);
  Mockito.when(file.exists()).thenReturn(false);
  Assert.assertFalse(FileIOUtils.isValidDirectory(file));
  Mockito.when(file.exists()).thenReturn(true);
  Mockito.when(file.isDirectory()).thenReturn(false);
  Assert.assertFalse(FileIOUtils.isValidDirectory(file));
  Mockito.when(file.exists()).thenReturn(true);
  Mockito.when(file.isDirectory()).thenReturn(true);
  Mockito.when(file.canRead()).thenReturn(false);
  Assert.assertFalse(FileIOUtils.isValidDirectory(file));
  Mockito.when(file.exists()).thenReturn(true);
  Mockito.when(file.isDirectory()).thenReturn(true);
  Mockito.when(file.canRead()).thenReturn(true);
  Assert.assertTrue(FileIOUtils.isValidDirectory(file));
}