@Test void fixMailboxInconsistenciesShouldNotAlterStateWhenConsistent() { imapUidDAO.insert(MESSAGE_1).block(); messageIdDAO.insert(MESSAGE_1).block(); testee.fixMessageInconsistencies(new Context(), RunningOptions.DEFAULT).block(); SoftAssertions.assertSoftly(softly -> { softly.assertThat(imapUidDAO.retrieveAllMessages().collectList().block()) .containsExactlyInAnyOrder(MESSAGE_1); softly.assertThat(messageIdDAO.retrieveAllMessages().collectList().block()) .containsExactlyInAnyOrder(MESSAGE_1); }); }
public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } @Inject  SolveMessageInconsistenciesService(CassandraMessageIdToImapUidDAO messageIdToImapUidDAO, CassandraMessageIdDAO messageIdDAO); }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } @Inject  SolveMessageInconsistenciesService(CassandraMessageIdToImapUidDAO messageIdToImapUidDAO, CassandraMessageIdDAO messageIdDAO); Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions); }
SolveMessageInconsistenciesService { public Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions) { return Flux.concat( fixInconsistenciesInMessageId(context, runningOptions), fixInconsistenciesInImapUid(context, runningOptions)) .reduce(Task.Result.COMPLETED, Task::combine); } @Inject  SolveMessageInconsistenciesService(CassandraMessageIdToImapUidDAO messageIdToImapUidDAO, CassandraMessageIdDAO messageIdDAO); Mono<Task.Result> fixMessageInconsistencies(Context context, RunningOptions runningOptions);  }