}
private void sendMessageToSupport(Object message, boolean expHandled) {
- boolean handled = support.handleSnapshotMessage(message);
+ boolean handled = support.handleSnapshotMessage(message, mockRaftActorRef);
assertEquals("complete", expHandled, handled);
}
Snapshot snapshot = Snapshot.create(snapshotBytes, Collections.<ReplicatedLogEntry>emptyList(),
lastIndexDuringSnapshotCapture, 1, lastAppliedDuringSnapshotCapture, 1);
- sendMessageToSupport(new ApplySnapshot(snapshot));
+ ApplySnapshot applySnapshot = new ApplySnapshot(snapshot);
+ sendMessageToSupport(applySnapshot);
- verify(mockSnapshotManager).apply(snapshot);
+ verify(mockSnapshotManager).apply(applySnapshot);
}
@Test