#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define pb push_back
#define x first
#define y second
#define fastread ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;

//modulo op

const ll mod = 1e9 + 7;

ll add(ll a, ll b) {
	return (a + b) % mod;
}

ll sub(ll a, ll b) {
	return ((a - b) % mod + mod) % mod;
}

ll mul(ll a, ll b) {
	return (a * b) % mod;
}

ll normalize(ll a) {
	return (a % mod + mod) % mod;
}
//end of modulo op
ll power(ll a, ll b) {
	if (b == 0)
		return 1;
	ll val = power(a, b / 2);
	val = mul(val, val);
	if (b & 1)
		val = mul(val, a);
	return val;
}

const int maxn = 2e5 + 7;
ll fact[maxn], ifact[maxn];

void precalc() {
	fact[0] = 1;
	ifact[0] = 1;
	for (int i = 1; i < maxn; i++) {
		fact[i] = mul(i, fact[i - 1]);
		ifact[i] = power(fact[i], mod - 2);
	}
}

ll ncr(ll n, ll r) {
	return mul(fact[n], mul(ifact[n - r], ifact[r]));
}


void solve() {
	ll n, l, r;
	cin >> n >> l >> r;
	ll double_op_limit = min(1 - l, r - n);
	ll ans = mul(add(ncr(n, n / 2), n & 1 == 1 ? ncr(n, n / 2 + 1) : 0), double_op_limit);
	// cout << double_op_limit << " " << ans << endl;
	for (ll i = double_op_limit + 1; i <= double_op_limit + n; i++) {
		ll left_fixed = max(l + i - 1, 0LL);
		ll right_fixed = n - min(n, r - i);
		// cout << i << " " << left_fixed << " " << right_fixed << endl;
		if (left_fixed > (n + 1) / 2 || right_fixed > (n + 1) / 2)
			break;
		ll rem = n - left_fixed - right_fixed;
		if (rem < 0)
			break;
		if (left_fixed == (n + 1) / 2) {
			ans = add(ans, 1);
			break;
		}
		ans = add(ans, ncr(rem, n / 2 - left_fixed));
		if (n & 1)
			ans = add(ans, ncr(rem, n / 2 + 1 - left_fixed));
		// cout << ans << endl;
	}
	cout << ans;
}

int main()
{
	fastread;
	precalc();
	int t;
	cin >> t;
	while (t--) {
		solve();
		cout << '\n';
	}
	return 0;
}