#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ll long long
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
const ll N = 2e5 + 5;
const ll M = 1e9 + 7;
ll fac[N], inv[N];
ll power(ll x, ll y, ll p)
{
    ll res = 1;
    x %= p;
    while(y > 0)
    {
        if(y & 1)res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}

ll ncr(ll n, ll r)
{
    if(r > n || n < 0)return 0;
    if (r == 0 || r == n)return 1;
    return (fac[n] * inv[r] % M * inv[n - r] % M) % M;
}
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    fast
    fac[0] = 1;
    for (ll i = 1 ; i < N; i++)
    {
        fac[i] = fac[i - 1] * i % M;
        inv[i] = power(fac[i], M - 2, M);
    }
    ll T;
    cin >> T;
    while(T--)
    {
        ll n, l, r, R;
        cin >> n >> l >> r;
        --l, --r;
        R = r;
        r -= (n - 1);
        ll k = min(abs(l), r);

        ll ans = (k * ncr(n, n / 2) % M);
        if(n % 2)ans = 2ll * ans % M;
        int df = max(abs(l), r) - k;
        df = -df;
        for(ll i = n - 1; i >= n / 2; i--)
        {
            df++;
            int cur = max(df, 0);
            if(n % 2 == 0)ans = (ans + ncr(i - cur, n / 2 - cur) % M) % M;
            else ans = (ans + ncr(i - cur, n / 2 - cur) + ncr(i - cur, n / 2 + 1 - cur)) % M;
        }
        cout << ans << endl;
    }
}