### Question:
SimpleHistoryServiceImpl implements TaskanaHistory { public TaskHistoryQuery createTaskHistoryQuery() { return new TaskHistoryQueryImpl(taskanaHistoryEngine); }  void initialize(TaskanaEngine taskanaEngine); @Override void create(TaskHistoryEvent event); @Override void create(WorkbasketHistoryEvent event); @Override void create(ClassificationHistoryEvent event); @Override void deleteHistoryEventsByTaskIds(List<String> taskIds); TaskHistoryEvent getTaskHistoryEvent(String historyEventId); TaskHistoryQuery createTaskHistoryQuery(); WorkbasketHistoryQuery createWorkbasketHistoryQuery(); ClassificationHistoryQuery createClassificationHistoryQuery();  }### Answer:
@Test void should_VerifyMethodInvocations_When_QueryTaskHistoryEvent() throws Exception { List<TaskHistoryEvent> returnList = new ArrayList<>(); returnList.add( AbstractAccTest.createTaskHistoryEvent( "wbKey1", "taskId1", "type1", "wbKey2", "someUserId", "someDetails")); when(taskanaHistoryEngineMock.getSqlSession()).thenReturn(sqlSessionMock); when(sqlSessionMock.selectList(any(), any())).thenReturn(new ArrayList<>(returnList)); final List<TaskHistoryEvent> result = cutSpy.createTaskHistoryQuery().taskIdIn("taskId1").list(); verify(taskanaHistoryEngineMock, times(1)).openConnection(); verify(taskanaHistoryEngineMock, times(1)).getSqlSession(); verify(sqlSessionMock, times(1)).selectList(any(), any()); verify(taskanaHistoryEngineMock, times(1)).returnConnection(); assertThat(result).hasSize(returnList.size()); assertThat(result.get(0).getWorkbasketKey()).isEqualTo(returnList.get(0).getWorkbasketKey()); }