sshd.setPort(8001);
sshd.setKeyPairProvider(Utils.createTestHostKeyProvider());
sshd.setSubsystemFactories(Arrays.<NamedFactory<Command>>asList(new SftpSubsystem.Factory()));
sshd.setShellFactory(new EchoShellFactory());
sshd.setCommandFactory(new GitPackCommandFactory("target/git/server"));
sshd.setPasswordAuthenticator(new BogusPasswordAuthenticator());
sshd.start();
File serverDir = new File("target/git/server/test.git");
Utils.deleteRecursive(serverDir);
Git.init().setBare(true).setDirectory(serverDir).call();