anchor.diff:          4 -> ?set_flags(?METADATA_PROTECTION, ?DATA_PROTECTION)
       end
   end).
  +
  +-define(ALL_PROTECTION, ?set_flags(?METADATA_PROTECTION, ?DATA_PROTECTION)).
   
   %%%===================================================================
   %%% API functions
  
positive.code:         lfm_proxy:list_top_datasets(Node, SessionId, SpaceId, State, #{offset => 0, limit => 100}), ?ATTEMPTS)
  ).
  
  -define(RAND_PROTECTION_FLAGS(), begin
      case rand:uniform(4) of
          1 -> ?no_flags_mask;
  
negative.code:         true ->
              % check whether dataset is visible on parent dataset's list
              {ok, DatasetsList, true} = ?assertMatch({ok, _, true},
                  lfm_proxy:list_children_datasets(Node, SessionId, ExpectedParentDatasetId, #{offset => 0, limit => 100}), ?ATTEMPTS);
  
          false ->
              % check whether dataset is visible on space top dataset list
              SpaceId = file_id:guid_to_space_id(ExpectedRootFileGuid),
              {ok, DatasetsList, true} = ?assertMatch({ok, _, true},
                  lfm_proxy:list_top_datasets(Node, SessionId, SpaceId, ExpectedState, #{offset => 0, limit => 100}), ?ATTEMPTS)
      end,
      ?assert(lists:any(fun(Dataset) ->
          {ExpDatasetId, ExpName, _} = Dataset,
          case {ExpDatasetId, ExpName} of
              {DatasetId, Name} -> true;
              _ -> false
          end
      end, DatasetsList)).
  