@@ -0,0 +1,1793 @@
+// This file is part of me.christopherdavis.beanstalkc%0A// Copyright: (c) 2014 Christopher Davis %3Chttp://christopherdavis.me%3E%0A// License: MIT http://opensource.org/licenses/MIT%0A%0Apackage me.christopherdavis.beanstalkc.command;%0A%0Aimport java.io.InputStream;%0Aimport java.io.OutputStream;%0Aimport java.io.IOException;%0Aimport org.junit.Test;%0Aimport org.junit.Before;%0Aimport org.junit.After;%0Aimport org.junit.Assert;%0Aimport org.mockito.Mockito;%0Aimport org.mockito.AdditionalAnswers;%0Aimport org.mockito.AdditionalMatchers;%0Aimport me.christopherdavis.beanstalkc.BeanstalkcException;%0Aimport me.christopherdavis.beanstalkc.Command;%0Aimport me.christopherdavis.beanstalkc.Job;%0A%0Apublic class PutJobCommandTest%0A%7B%0A    private InputStream in;%0A    private OutputStream out;%0A    private PutJobCommand cmd;%0A    final private byte%5B%5D expected_first = %22put 1 1 1 4%5Cr%5Cn%22.getBytes();%0A    final private byte%5B%5D expected_second = %22test%5Cr%5Cn%22.getBytes();%0A%0A    @Test(expected=BeanstalkcException.class)%0A    public void testErrorExpectedCrlf() throws BeanstalkcException, IOException%0A    %7B%0A        Mockito.doAnswer(AdditionalAnswers.returnsElementsOf(TestHelper.byteCollection(%22EXPECTED_CRLF%22)))%0A               .when(in)%0A               .read();%0A%0A        cmd.execute(in, out);%0A    %7D%0A%0A    @Before%0A    public void setUp()%0A    %7B%0A        in = Mockito.mock(InputStream.class);%0A        out = Mockito.mock(OutputStream.class);%0A        cmd = new PutJobCommand(1, 1, 1, %22test%22.getBytes());%0A    %7D%0A%0A    @After%0A    public void tearDown() throws IOException%0A    %7B%0A        // we write on every test, so make sure it happens%0A        Mockito.verify(out).write(AdditionalMatchers.aryEq(expected_first));%0A        Mockito.verify(out).write(AdditionalMatchers.aryEq(expected_second));%0A        Mockito.reset(in);%0A        Mockito.reset(out);%0A    %7D%0A%7D%0A

Add a PutJobCommandTest -- runs out of memeory currently