String driverPath(File homeDir, Provider provider) {
    String dirPath = provider.path;
    File dir = new File(homeDir, dirPath);
    if (!dir.exists()) {
      throw new MessageException("Directory does not exist: " + dirPath);
    }
    List<File> files = new ArrayList<>(FileUtils.listFiles(dir, new String[] {"jar"}, false));
    if (files.isEmpty()) {
      throw new MessageException("Directory does not contain JDBC driver: " + dirPath);
    }
    if (files.size() > 1) {
      throw new MessageException("Directory must contain only one JAR file: " + dirPath);
    }
    return files.get(0).getAbsolutePath();
  }
@Test
  public void driver_dir_does_not_exist() {
    assertThatThrownBy(() -> underTest.driverPath(homeDir, Provider.ORACLE))
      .isInstanceOf(MessageException.class)
      .hasMessage("Directory does not exist: extensions/jdbc-driver/oracle");
  }