RaftActorSnapshotMessageSupport { private void onCaptureSnapshotReply(CaptureSnapshotReply reply) { log.debug("{}: CaptureSnapshotReply received by actor", context.getId()); context.getSnapshotManager().persist(reply.getSnapshotState(), reply.getInstallSnapshotStream(), context.getTotalMemory()); } RaftActorSnapshotMessageSupport(final RaftActorContext context, final RaftActorSnapshotCohort cohort);   }
@Test public void testOnCaptureSnapshotReply() { ByteState state = ByteState.of(new byte[]{1,2,3,4,5}); Optional<OutputStream> optionalStream = Optional.of(mock(OutputStream.class)); sendMessageToSupport(new CaptureSnapshotReply(state, optionalStream)); verify(mockSnapshotManager).persist(eq(state), eq(optionalStream), anyLong()); }