@@ -0,0 +1,1393 @@
+package expectj;%0A%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0A%0Aimport org.mockito.Mockito;%0A%0Aimport com.jcraft.jsch.Channel;%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A * Verify %7B@link SshSpawn%7D.%0A *%0A * @author johan.walles@gmail.com%0A */%0Apublic class TestSshSpawn extends TestCase %7B%0A    /**%0A     * Verify that a channel session holds together.%0A     *%0A     * @throws Exception If testing goes exceptionally bad.%0A     */%0A    public void testSshSpawnChannel() throws Exception %7B%0A        InputStream inputStream = (InputStream)Mockito.mock(InputStream.class);%0A        OutputStream outputStream = (OutputStream)Mockito.mock(OutputStream.class);%0A%0A        Channel channel = (Channel)Mockito.mock(Channel.class);%0A        Mockito.when(channel.getInputStream()).thenReturn(inputStream);%0A        Mockito.when(channel.getOutputStream()).thenReturn(outputStream);%0A%0A        Spawnable testMe = new SshSpawn(channel);%0A%0A        // This should be a no-op%0A        testMe.start();%0A%0A        assertSame(inputStream, testMe.getStdout());%0A        assertSame(outputStream, testMe.getStdin());%0A        assertNull(testMe.getStderr());%0A%0A        assertFalse(testMe.isClosed());%0A        ((Channel)(Mockito.verify(channel))).isClosed();%0A%0A        testMe.stop();%0A        ((Channel)(Mockito.verify(channel))).disconnect();%0A%0A        assertTrue(testMe.isClosed());%0A%0A        assertTrue(testMe.getExitValue() == 0);%0A    %7D%0A%7D%0A

Add unit tests for the SSH spawnable.