LOG.log(Level.INFO, "Testing protocol "
+ protocol.getClass().getCanonicalName()
+ " . . . this may take a few minutes . . .");
// test ls, cd, and pwd
this.cdToHOME(protocol);
ProtocolFile home = this.pwd(protocol);
this.ls(protocol);
if (remoteSite.getCdTestDir() != null)
this.cd(protocol, new ProtocolFile(remoteSite,
new ProtocolPath(remoteSite.getCdTestDir(), true)));
else
this.cdToROOT(protocol);
this.cdToHOME(protocol);
if (home == null || !home.equals(protocol.pwd()))
throw new ProtocolException(
"Home directory not the same after cd");
} catch (Exception e) {
LOG.log(Level.SEVERE, "Protocol "
+ protocol.getClass().getCanonicalName()