def METHOD_NAME(param_delta: dict, expected_validation: bool):
    params = {}
    params.update(REFERENCE_PARAMS)
    params.update(param_delta)
    reference_time = params['reference_time']
    with override_settings(
        SECRET_KEY=params["generation_secret_key"],
        XBLOCK_HANDLER_TOKEN_KEYS=params["generation_xblock_handler_token_keys"],
    ):
        with freeze_time(reference_time):
            token = get_secure_token_for_xblock_handler(
                params["generation_user_id"], params["generation_block_key_str"]
            )
    with override_settings(
        SECRET_KEY=params["validation_secret_key"],
        XBLOCK_HANDLER_TOKEN_KEYS=params["validation_xblock_handler_token_keys"],
    ):
        with freeze_time(reference_time + datetime.timedelta(seconds=params["validation_time_delta_s"])):
            assert (
                validate_secure_token_for_xblock_handler(
                    params["validation_user_id"], params["validation_block_key_str"], token
                ) ==
                expected_validation
            )