anchor.diff:              XattrsToGet = case Attribute of
                   undefined ->
                       case {DirectMetadataSet, IncludeInherited, ShareId, ShowInternal} of
  -                        {true, _, _, true} ->
  +                        {true, true, undefined, true} ->
                               ?ALL_XATTRS_KEYS;
  -                        {true, _, _, false} ->
  -                            [?XATTR_KEY];
  -                        {false, false, _, _} ->
  -                            [];
  +                        {true, true, undefined, false} ->
  +                            % Only custom xattrs are shown
  +                            [?XATTR_1_KEY, ?XATTR_2_KEY];
  +                        {true, true, _ShareId, true} ->
  +                            % Xattr1 cannot be fetched as it is above share root
  +                            ?ALL_XATTRS_KEYS -- [?XATTR_1_KEY];
  +                        {true, true, _ShareId, false} ->
  +                            [?XATTR_2_KEY];
  +                        {true, false, _, true} ->
  +                            ?ALL_XATTRS_KEYS -- [?XATTR_1_KEY];
  +                        {true, false, _, false} ->
  +                            [?XATTR_2_KEY];
                           {false, true, undefined, true} ->
  -                            % Exclude cdmi attrs as those are not inherited
  -                            ?ALL_XATTRS_KEYS -- ?CDMI_XATTRS_KEY;
  +                            % Exclude cdmi attrs as those are not inherited and xattr2 as it is not set
  +                            (?ALL_XATTRS_KEYS -- [?XATTR_2_KEY]) -- ?CDMI_XATTRS_KEY;
                           {false, true, undefined, false} ->
  -                            [?XATTR_KEY];
  -                        {false, true, _, _} ->
  -                            % No xattr could be inherited due to share root blocking further traverse
  +                            [?XATTR_1_KEY];
  +                        {false, _, _, _} ->
  +                            % No xattr could be inherited due to either not specified
  +                            % 'inherited' flag or share root blocking further traverse
                               []
                       end;
                   _ ->
  
positive.code:     ?CDMI_COMPLETION_STATUS_KEY => ?CDMI_COMPLETION_STATUS_2,
      ?JSON_METADATA_KEY => ?JSON_METADATA_5,
      ?RDF_METADATA_KEY => ?RDF_METADATA_2,
      ?XATTR_KEY => ?XATTR_2_VALUE
  }).
  
  
  
negative.code: -define(CDMI_COMPLETION_STATUS_1, <<"Completed">>).
  -define(CDMI_COMPLETION_STATUS_2, <<"Processing">>).
  
  -define(XATTR_1_KEY, <<"custom_xattr1">>).
  -define(XATTR_1_VALUE, <<"value1">>).
  -define(XATTR_1, #xattr{name = ?XATTR_1_KEY, value = ?XATTR_1_VALUE}).
  -define(XATTR_2_KEY, <<"custom_xattr2">>).
  -define(XATTR_2_VALUE, <<"value2">>).
  -define(XATTR_2, #xattr{name = ?XATTR_2_KEY, value = ?XATTR_2_VALUE}).
  
  -define(ACL_1, [#{
      <<"acetype">> => <<"0x", (integer_to_binary(?allow_mask, 16))/binary>>,
  