data.getExecutionData(Long.valueOf(123), "Foo", 1).getProbes()[0] = true;
final RemoteControlWriter remoteWriter = new RemoteControlWriter(
mockConnection.getSocketB().getOutputStream());
final TcpConnection con = new TcpConnection(
mockConnection.getSocketA(), data);
con.init();
final Future<Void> f = executor.submit(new Callable<Void>() {
public Void call() throws Exception {
con.run();
return null;
}
});
assertBlocks(f);
remoteWriter.visitDumpCommand(false, true);
final RemoteControlReader remoteReader = new RemoteControlReader(
mockConnection.getSocketB().getInputStream());
final ExecutionDataStore execStore = new ExecutionDataStore();
remoteReader.setExecutionDataVisitor(execStore);
final SessionInfoStore infoStore = new SessionInfoStore();
remoteReader.setSessionInfoVisitor(infoStore);
assertTrue(remoteReader.read());
assertTrue(infoStore.getInfos().isEmpty());
assertTrue(execStore.getContents().isEmpty());
assertFalse(data.getExecutionData(Long.valueOf(123), "Foo", 1)
.getProbes()[0]);
con.close();
f.get();
}