public void shouldThrowErrorWhenSettingCurrentDirectoryInDisabledJFileChooser() {
   disableFileChooser();
   try {
     driver.setCurrentDirectory(fileChooser, userHomeDirectory());
     failWhenExpectingException();
   } catch (IllegalStateException e) {
     assertActionFailureDueToDisabledComponent(e);
   }
 }
 public void shouldThrowErrorWhenSettingCurrentDirectoryInNotShowingJFileChooser() {
   hideWindow();
   try {
     driver.setCurrentDirectory(fileChooser, userHomeDirectory());
     failWhenExpectingException();
   } catch (IllegalStateException e) {
     assertActionFailureDueToNotShowingComponent(e);
   }
 }
 public void shouldSetCurrentDirectory() {
   File userHome = userHomeDirectory();
   driver.setCurrentDirectory(fileChooser, userHome);
   assertThat(currentDirectoryAbsolutePath(fileChooser)).isEqualTo(userHome.getAbsolutePath());
 }