public void setup() throws Exception {
logger = new ExceptionRecorder();
final MockSocketConnection con = new MockSocketConnection();
remoteSocket = con.getSocketB();
remoteWriter = new RemoteControlWriter(remoteSocket.getOutputStream());
controller = new TcpClientOutput(logger) {
@Override
protected Socket createSocket(AgentOptions options)
throws IOException {
return con.getSocketA();
}