@Test
    public void policy_context_set_on_no_distributors_exception_during_select() {
        letPolicyCacheStateWithNoAvailableDistributors();
        // Re-select with no distributors. Should still get a target selection context.
        var target = select();
        // Trigger a reply merge with error, which will try to inspect the context.
        // If an exception is thrown internally from a missing context, the reply will not be
        // set correctly and this will fail.
        replyError(target, new Error(ErrorCode.FATAL_ERROR, "oh no!"));
    }
To be independent of changes in distribution algorithm, we programmatically calculate preferred order of
bucket 1, which we will be using in the tests. To avoid doing this ahead of every test, we still hardcode the
values, though only one place, and have this test to verify they are correct, and make it easy to update the values.
documentapi/src/test/java/com/yahoo/documentapi/messagebus/protocol/test/storagepolicy/BasicTests.java