#include <bits/stdc++.h>
#include <iostream>
using namespace std;

typedef long long ll;

const int mxN = 2e5+5;
const int mxK = 26;
const int mod = 1e9+7;

ll f[mxN];
ll powb(ll a, ll x)
{
    a %= mod;
    ll ret = 1;
    while(x)
    {
        if(x&1) ret=ret*a%mod;
        x>>=1;
        a=a*a%mod;
    }
    return ret;
}
ll inv(ll x)
{
    return powb(x, mod-2);
}
///b je veci
ll chose(ll a, ll b)
{
    return f[b]*inv(f[a])%mod*inv(f[b-a])%mod;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    f[0] = 1;
    for(int i = 1; i < mxN; i++) f[i]=f[i-1]*i%mod;

    int t; cin >> t;
    while(t--)
    {
        ll n, l, r; cin >> n >> l >> r;
        ll ans = 0;
        //(n/2) x
        //((n+1)/2) y
        //if moze na 0 i na n-1 min i max onda izaberi n/2 polja od n
        //else skontaj koliko prvih/poslednjih je fixano i onda calc
        ll mn = min(abs(1-l), abs(1-r));
        mn = min(mn, min(abs(n-l), abs(n-r)));
        //[mn, 0) moze svi
        ans = mn*chose(n/2, n)%mod;
        if(n&1) ans = ans*2%mod;
        ///if n&1
        ///if l == 1 && r == n
        //cout << "ovde " << ans << "\n";
        while(true)
        {
            mn++;
            //cout << "mn " << mn << "\n";
            ///dok moze da stane n/2, (n+1)/2
            ///uzimamo -mn, i +mn
            ll pls = min(r-mn, n); ///+++++000
            ll mns = max(1LL, l+mn); ///0000----
            //cout << "pls " << pls << " mns " << mns << "\n";
            if(pls < 1  || mns > n) break;
            if(n-pls+mns-1 > n) break;
            if(pls < n/2 || n-mns+1 < n/2) break;
            ///n-pls nula gore
            ///mns-1 nula dole
            ll m100 = n-pls;
            ll p100 = mns-1;
            if(n&1)
            {
                int c = 0;
                if(pls == n/2) c++;
                if(n-mns+1 == n/2) c++;
                if(c==2) break;
                ll x = n-m100-p100;
                ans += chose(n/2-p100, x);
                ans += chose(n/2+1-p100, x);
                ans %= mod;
            }
            else
            {
                ll x = n-m100-p100;
                ans += chose(n/2-p100, x);
                //cout << "+" << chose(n/2-p100, x) << "\n";
                ans %= mod;
            }
        }
        cout << ans << "\n";
    }
}

/*
1,-1,-1
-1,1,-1
1,1,-1
2,-2,-2;
1
4 -3 5
*/
