- public void setUp() throws Exception {
- MockitoAnnotations.initMocks(this);
-
- final SchemaContext schemaContext = TestModel.createTestContext();
-
- Mockito.when(actorContext.getSchemaContext()).thenReturn(schemaContext);
- Mockito.when(actorContext.getDatastoreContext()).thenReturn(DatastoreContext.newBuilder().build());
- Mockito.when(clientTransaction.getIdentifier()).thenReturn(TRANSACTION_IDENTIFIER);
- Mockito.when(clientSnapshot.getIdentifier()).thenReturn(TRANSACTION_IDENTIFIER);
-
- Mockito.when(clientActor.getIdentifier()).thenReturn(CLIENT_IDENTIFIER);
- Mockito.when(clientActor.createTransaction()).thenReturn(clientTransaction);
- Mockito.when(clientActor.createLocalHistory()).thenReturn(clientLocalHistory);
- Mockito.when(clientActor.createSnapshot()).thenReturn(clientSnapshot);
+ public void setUp() {
+ doReturn(DatastoreContext.newBuilder().build()).when(actorUtils).getDatastoreContext();
+ doReturn(TRANSACTION_IDENTIFIER).when(clientTransaction).getIdentifier();
+ doReturn(TRANSACTION_IDENTIFIER).when(clientSnapshot).getIdentifier();
+
+ doReturn(clientTransaction).when(clientActor).createTransaction();
+ doReturn(clientLocalHistory).when(clientActor).createLocalHistory();
+ doReturn(clientSnapshot).when(clientActor).createSnapshot();