@Test public void testGetWorkflowActionsByType() { // given final List<WorkflowActionModel> mockActions = new ArrayList<WorkflowActionModel>(); when(workflowActionDao.findWorkflowActionsByType(WorkflowActionType.END, workflow)) .thenReturn(mockActions); // when final List<WorkflowActionModel> actions = workflowActionService.getWorkflowActionsByType(WorkflowActionType.END, workflow); // then assertThat(actions).isSameAs(mockActions); }