anchor.diff:      ?assertEqual(ExpLinks, ListedLinks).
   
   
  -%% @private
  --spec list_all_links_by_chunk(
  -    node(),
  -    listing_method(),
  -    od_space:id(),
  -    atm_workflow_execution:phase(),
  -    atm_workflow_executions_forest:tree_ids(),
  -    atm_workflow_executions_forest:listing_opts(),
  -    [{atm_workflow_execution:id(), atm_workflow_executions_forest:index()}]
  -) ->
  -    [{atm_workflow_execution:id(), atm_workflow_executions_forest:index()}].
  -list_all_links_by_chunk(Node, ListingMethod, SpaceId, Phase, ListedAtmInventoryIds, ListingOpts, LinksAcc) ->
  -    case list_links(Node, SpaceId, Phase, ListedAtmInventoryIds, ListingOpts) of
  -        [] ->
  -            LinksAcc;
  -        ListedLinks ->
  -            list_all_links_by_chunk(
  -                Node, ListingMethod, SpaceId, Phase, ListedAtmInventoryIds,
  -                update_listing_opts(ListingMethod, ListingOpts, ListedLinks),
  -                LinksAcc ++ ListedLinks
  -            )
  -    end.
  -
  -
  -%% @private
  --spec update_listing_opts(
  -    listing_method(),
  -    atm_workflow_executions_forest:listing_opts(),
  -    [{atm_workflow_execution:id(), atm_workflow_executions_forest:index()}]
  -) ->
  -    atm_workflow_executions_forest:listing_opts().
  -update_listing_opts(offset, ListingOpts, ListedLinks) ->
  -    maps:update_with(offset, fun(Offset) -> Offset + length(ListedLinks) end, ListingOpts);
  -update_listing_opts(start_index, ListingOpts, ListedLinks) ->
  -    maps:update(start_index, element(2, lists:last(ListedLinks)), ListingOpts#{offset => 1}).
  -
  -
   %%%===================================================================
   %%% Internal functions
   %%%===================================================================
  
positive.code:     lists:foreach(fun(InvalidListingOpts) ->
          ?assertEqual(?EINVAL, list_links(KrkNode, SpaceId, Phase, all, InvalidListingOpts))
      end, [
          % Either offset or start_index must be specified
          #{}, #{limit => 10},
          % Limit lower than 1 is not allowed
          #{offset => 0, limit => -10}, #{offset => 0, limit => 0}, #{offset => 0, limit => all},
          % Offset must be proper integer
          #{offset => <<>>}, #{offset => -2.5},
          % Start index must be proper binary
          #{start_index => 10}
      ]).
  
  
  
negative.code: 
          case lists:member(AtmInventoryId, ListedAtmInventoryIds) of
              true ->
                  {true, {index(Phase, AtmWorkflowExecutionDoc), AtmWorkflowExecutionId}};
              false ->
                  false
          end
  