@Test
public void testAppendResponse() throws Exception
{

    when( response.getStdOut() ).thenReturn( OUTPUT );
    when( response.getStdErr() ).thenReturn( OUTPUT );
    when( response.getExitCode() ).thenReturn( EXIT_CODE );
    commandProcess.appendResponse( response );
    verify( response, times( 2 ) ).getStdOut();
    verify( response, times( 2 ) ).getStdErr();
    verify( response ).getExitCode();
    assertEquals( CommandStatus.SUCCEEDED, commandProcess.status );
    reset( response );
    when( response.getStdOut() ).thenReturn( OUTPUT );
    when( response.getStdErr() ).thenReturn( OUTPUT );
    when( response.getExitCode() ).thenReturn( null );
    when( response.getType() ).thenReturn( ResponseType.EXECUTE_TIMEOUT );
    commandProcess.appendResponse( response );
    verify( response, times( 2 ) ).getStdOut();
    verify( response, times( 2 ) ).getStdErr();
    verify( response ).getExitCode();
    assertEquals( CommandStatus.KILLED, commandProcess.status );
}