@Test
public void testTransactionPerTuple() throws IOException
{

  operator.setup(context);
  // get the mock client which will capture each transactions
  final MockSiteToSiteClient mockClient = (MockSiteToSiteClient)operator.client;
  final String tuple1 = "tuple1";
  final String tuple2 = "tuple2";
  final String tuple3 = "tuple3";
  operator.beginWindow(1);
  operator.inputPort.process(tuple1);
  Assert.assertEquals(1, mockClient.getMockTransactions().size());
  operator.inputPort.process(tuple2);
  Assert.assertEquals(2, mockClient.getMockTransactions().size());
  operator.inputPort.process(tuple3);
  Assert.assertEquals(3, mockClient.getMockTransactions().size());
  operator.endNewWindow();
  Assert.assertEquals(3, mockClient.getMockTransactions().size());
  // verify we sent the correct content
  List<String> expectedContents = Arrays.asList(tuple1, tuple2, tuple3);
  List<MockTransaction> transactions = mockClient.getMockTransactions();
  verifyTransactions(expectedContents, transactions);
}