prepareServer(true);
server.start();
try {
org.apache.sshd.SshServer sshd = (org.apache.sshd.SshServer) ReflectionTestUtils.getField(server, "sshd");
CommandFactory fact = sshd.getCommandFactory();
Command cmd = fact.createCommand("shutdown now");
assertTrue(cmd instanceof SshCommand);
assertEquals(((SshCommand) cmd).getCommand(),"shutdown now");
} finally {
server.stop();
}