doNothing().when(mockUserCohorts).commit();
doReturn(Optional.empty()).when(mockUserCohorts).abort();
- cohort = new SimpleShardDataTreeCohort.Normal(mockShardDataTree, mockModification, nextTransactionId(),
+ cohort = new SimpleShardDataTreeCohort(mockShardDataTree, mockModification, nextTransactionId(),
mockUserCohorts);
}
@Test
public void testAbort() throws Exception {
- doReturn(true).when(mockShardDataTree).startAbort(cohort);
+ doReturn(Boolean.TRUE).when(mockShardDataTree).startAbort(cohort);
abort(cohort).get();
verify(mockShardDataTree).startAbort(cohort);
doReturn(true).when(mockShardDataTree).startAbort(cohort);
final Promise<Iterable<Object>> cohortFuture = akka.dispatch.Futures.promise();
- doReturn(Optional.of(cohortFuture.future())).when(mockUserCohorts).abort();
+ doReturn(Optional.of(Collections.singletonList(cohortFuture.future()))).when(mockUserCohorts).abort();
final Future<?> abortFuture = abort(cohort);