data.setSessionId("stubid");
final Socket socket = serverSocket.connect();
final RemoteControlWriter remoteWriter = new RemoteControlWriter(
socket.getOutputStream());
final RemoteControlReader remoteReader = new RemoteControlReader(
socket.getInputStream());
// First process a NOP command to ensure the connection is initialized:
remoteWriter.visitDumpCommand(false, false);
remoteReader.read();
// Now the actual test starts:
controller.writeExecutionData(false);
final ExecutionDataStore execStore = new ExecutionDataStore();
remoteReader.setExecutionDataVisitor(execStore);
final SessionInfoStore infoStore = new SessionInfoStore();
remoteReader.setSessionInfoVisitor(infoStore);
remoteReader.read();
assertEquals("Foo", execStore.get(0x12345678).getName());
final List<SessionInfo> infos = infoStore.getInfos();
assertEquals(1, infos.size());