@Test
  public void testGetAllUserWorkflowActionsWithAttachmentForString() {
    // given
    final List<WorkflowActionModel> actions = new ArrayList<WorkflowActionModel>();
    actions.add(mock(WorkflowActionModel.class));
    final ComposedTypeModel mockProductComposedType = mock(ComposedTypeModel.class);
    when(mockProductComposedType.getJaloclass()).thenReturn(Product.class);
    when(typeService.getComposedTypeForCode(ProductModel._TYPECODE))
        .thenReturn(mockProductComposedType);
    when(workflowActionDao.findWorkflowActionsByStatusAndAttachmentType(
            Collections.singletonList(mockProductComposedType),
            Collections.singletonList(WorkflowActionStatus.IN_PROGRESS)))
        .thenReturn(actions);

    // when
    final List<WorkflowActionModel> endWorkflowActions =
        workflowActionService.getAllUserWorkflowActionsWithAttachment(ProductModel._TYPECODE);

    // then
    assertThat(endWorkflowActions).isSameAs(actions);
  }