- JavaTestKit verification = new JavaTestKit(getSystem());
- transaction.tell(new ShardWriteTransaction.GetCompositedModification(), verification.getRef());
-
- CompositeModification compositeModification = verification.expectMsgClass(duration("5 seconds"),
- GetCompositeModificationReply.class).getModification();
-
- assertEquals("CompositeModification size", 3, compositeModification.getModifications().size());
-
- WriteModification write = (WriteModification)compositeModification.getModifications().get(0);
- assertEquals("getPath", writePath, write.getPath());
- assertEquals("getData", writeData, write.getData());
-
- MergeModification merge = (MergeModification)compositeModification.getModifications().get(1);
- assertEquals("getPath", mergePath, merge.getPath());
- assertEquals("getData", mergeData, merge.getData());
-
- DeleteModification delete = (DeleteModification)compositeModification.getModifications().get(2);
- assertEquals("getPath", deletePath, delete.getPath());
-
- InOrder inOrder = Mockito.inOrder(mockWriteTx);
- inOrder.verify(mockWriteTx).write(writePath, writeData);
- inOrder.verify(mockWriteTx).merge(mergePath, mergeData);
- inOrder.verify(mockWriteTx).delete(deletePath);
+ InOrder inOrder = Mockito.inOrder(mockModification);
+ inOrder.verify(mockModification).write(writePath, writeData);
+ inOrder.verify(mockModification).merge(mergePath, mergeData);
+ inOrder.verify(mockModification).delete(deletePath);