TorqueJPPFNodeDeployer implements TorqueNodeDeployment, PublicIpNotifier { @VisibleForTesting void deployInfrastructure(Collection<File> artifactsToPreload) { InfrastructureDeployer infrastructureDeployer = new InfrastructureDeployer(sshClient); infrastructureDeployer.deployInfrastructure(artifactsToPreload); } TorqueJPPFNodeDeployer(TorqueConfiguration configuration, SSHClient sshClient); synchronized void prepareAndDeployInfrastructure(Collection<File> artifactsToPreload); void deployNewNode(TorqueNodeConfiguration nodeConfiguration); @Override String getDriverAddress(); @Override String getSessionId(); @Override SSHClient sshClient(); void disconnectSshConnection(); @Override void notifyPublicIp(String publicIp); @Override void addListener(Observer listener); @Override void remoteListener(Observer listener);  }
@Test public void deployInfrastructure() throws Exception { assertThat(torqueJPPFNodeDeployer.isInfrastructureDeployed(), is(false)); torqueJPPFNodeDeployer.prepareAndDeployInfrastructure(new LinkedList<File>()); verify(sshClient).connect(eq("ssh.example.com"), eq(30)); assertThat(torqueJPPFNodeDeployer.isInfrastructureDeployed(), is(true)); }