anchor.diff:  -ifdef(EUNIT).
   
   basic_parse_validate_auto_compaction_settings_test() ->
  +    %% TODO: Need to mock cluster_compat_mode:is_cluster_***
       {ok, Stuff0, [],
  -     [{index_fragmentation_percentage, 43}]} =
  +     []} =
           parse_validate_auto_compaction_settings([{"databaseFragmentationThreshold[percentage]", "10"},
                                                    {"viewFragmentationThreshold[percentage]", "20"},
                                                    {"indexFragmentationThreshold[size]", "42"},
  
positive.code:                                                                 {"allowedTimePeriod[toHour]", "2"},
                                                                  {"allowedTimePeriod[toMinute]", "3"},
                                                                  {"allowedTimePeriod[abortOutside]", "false"}],
                                                                 true),
      ?assertEqual([{<<"_">>, <<"Got unsupported fields: databaseFragmentationThreshold">>}],
                   Stuff1),
      ok.
  
negative.code: 
              case Is40 of
                  true ->
                      case cluster_compat_mode:is_cluster_watson() of
                          true ->
                              new_index_compaction_settings(MaybeIndex);
                          false ->
                              old_index_compaction_settings(ACSettings, MaybeIndex)
                      end;
                  false ->
                      ok
              end,
  
              ns_audit:modify_compaction_settings(Req, ACSettings ++ MaybePurgeInterval ++ MaybeIndex),
              reply_json(Req, [], 200)
      end.
  
  old_index_compaction_settings(ACSettings, MaybeIndex) ->
      AllowedPeriod = proplists:get_value(allowed_time_period, ACSettings, []),
      Fragmentation =
          case MaybeIndex of
              [] ->
                  [];
              _ ->
                  [{fragmentation, misc:expect_prop_value(index_fragmentation_percentage, MaybeIndex)}]
          end,
  
      {ok, _} = index_settings_manager:update(compaction,
                                              [{interval, AllowedPeriod}] ++ Fragmentation).
  
  new_index_compaction_settings(Settings) ->
      case proplists:get_value(index_fragmentation_percentage, Settings) of
          undefined ->
              ok;
          Val ->
              index_settings_manager:update(compaction, [{fragmentation, Val}])
      end,
      SetList = [{index_circular_compaction_days, daysOfWeek},
                 {index_circular_compaction_abort, abort_outside},
                 {index_circular_compaction_interval, interval}],
      Set = lists:filtermap(
              fun ({K, NewK}) ->
                      case proplists:get_value(K, Settings) of
                          undefined ->
                              false;
                          V ->
                              {true, {NewK, V}}
                      end
              end, SetList),
      case Set of
          [] ->
              ok;
          _ ->
              index_settings_manager:update(circularCompaction, Set)
      end,
      case proplists:get_value(index_compaction_mode, Settings) of
          undefined ->
              ok;
          Mode ->
              index_settings_manager:update(compactionMode, Mode)
      end.
  
  mk_number_field_validator_error_maker(JSONName, Msg, Args) ->
  