@Override
public void run() {
try {
for (int n = 0; n < NUM_ITERATIONS; n++) {
DataOutputView writeEnd = backChannel.getWriteEnd();
readInputFromDataChannel();
Thread.sleep(random.nextInt(10));
DataInputView inputView = Mockito.mock(DataInputView.class);
actionLog.add("tail writes in iteration " + n);
writeEnd.write(inputView, 1);
backChannel.notifyOfEndOfSuperstep();
}
} catch (Exception e) {
throw new RuntimeException(e);
}