verify(mockStream);
}
private static RelayCell createDataCell(byte[] data) {
final RelayCell cell = createMock("dataCell", RelayCell.class);
expect(cell.cellBytesRemaining()).andReturn(data.length);
expectLastCall().times(2);
expect(cell.getRelayCommand()).andReturn(RelayCell.RELAY_DATA);
expect(cell.getPayloadBuffer()).andReturn(ByteBuffer.wrap(data));
replay(cell);
return cell;