Do you fear that /path/to/non-existing/repository.git by chance does really exist? If we want to create a pathName which does not exist there should be easier ways then to create a repo and then delete it again. Maybe something like

String path = new File(
  System.getProperty("java.io.tmpdir"),
  "TransportTest" +
    Long.toString(System.currentTimeMillis())
  ).getAbsolutePath();