Mockito.when(history.takeSnapshot()).thenReturn(snapshot);
Mockito.when(history.createTransaction()).thenReturn(transaction);
Mockito.when(history.takeSnapshot()).thenReturn(snapshot);
Mockito.when(history.createTransaction()).thenReturn(transaction);