doNothing().when(mockUserCohorts).commit();
doReturn(Optional.empty()).when(mockUserCohorts).abort();
- cohort = new SimpleShardDataTreeCohort(mockShardDataTree, mockModification, nextTransactionId(),
+ cohort = new SimpleShardDataTreeCohort.Normal(mockShardDataTree, mockModification, nextTransactionId(),
mockUserCohorts);
}
@Test
public void testAbort() throws Exception {
- doNothing().when(mockShardDataTree).startAbort(cohort);
+ doReturn(true).when(mockShardDataTree).startAbort(cohort);
abort(cohort).get();
verify(mockShardDataTree).startAbort(cohort);
@Test
public void testAbortWithCohorts() throws Exception {
- doNothing().when(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();