#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
#define setIO(x) freopen(x".in", "r", stdin), freopen(x".out", "w", stdout)
#define closefile fclose(stdin), fclose(stdout)
#define m_p make_pair
#define sz(x) (int)x.size()
#define see(x) cerr << x << " "
#define seeln(x) cerr << x << endl
#define out(x) cerr << #x << " = " << x << " "
#define outln(x) cerr << #x << " = " << x << endl
#define outarr(x, l, r) {cerr << #x"[" << l << " ~ " << r << "] = "; for (int _i = l; _i <= r; ++_i) cerr << x[_i] << " "; cerr << endl;}
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define gc() getchar()
//#define gc() (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++)
char buf[1 << 21], *p1 = buf, *p2 = buf;
template <class T> void read(T &x)
{
    x = 0; int c = gc(); int flag = 0;
    while (c < '0' || c > '9') flag |= (c == '-'), c = gc();
    while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = gc();
    if (flag) x = -x;
}
template <class T> T _max(T a, T b){return b < a ? a : b;}
template <class T> T _min(T a, T b){return a < b ? a : b;}
template <class T> bool checkmax(T &a, T b){return a < b ? a = b, 1 : 0;}
template <class T> bool checkmin(T &a, T b){return b < a ? a = b, 1 : 0;}
const int N = 200005, mod = 1000000000 + 7;
void add(int &a, int b){a += b; (a >= mod) && (a -= mod);}
void sub(int &a, int b){a -= b; (a < 0) && (a += mod);}
void mul(int &a, int b){a = (ll)a * b % mod;}
int Add(int a, int b){a += b; return a >= mod ? a - mod : a;}
int Sub(int a, int b){a -= b; return a < 0 ? a + mod : a;}
int Mul(int a, int b){return (ll)a * b % mod;}
int qpow(int a, int b){int ans = 1; while (b) {if (b & 1) ans = (ll)ans * a % mod; a = (ll)a * a % mod; b >>= 1;} return ans;}
int Inv(int a){return qpow(a, mod - 2);}
int n, l, r;
int fac[N], ifac[N];
int binom(int n, int m){return n < 0 || m < 0 || n < m ? 0 : Mul(fac[n], Mul(ifac[m], ifac[n - m]));}
void prepare(int n)
{
	fac[0] = 1; for (int i = 1; i <= n; ++i) fac[i] = Mul(fac[i - 1], i);
	ifac[n] = qpow(fac[n], mod - 2); for (int i = n - 1; i >= 0; --i) ifac[i] = Mul(ifac[i + 1], i + 1);
}

void init()
{
	read(n); read(l); read(r);
}

void solve()
{
	int lim = min(r - 1, n - l);
	int h1 = n / 2, h2 = n - h1;
	int p = min(1 - l, r - n);
	int ans = binom(n, h1);
	if (h1 ^ h2) add(ans, binom(n, h2));
	mul(ans, p);
	for (int k = p + 1; k <= lim; ++k)
	{
		int c1 = min(r - k, n) - max(l - k, 1) + 1;
		int c2 = min(r + k, n) - max(l + k, 1) + 1;
		int c = c1 + c2 - n;
		c1 -= c, c2 -= c;
		if (h1 == h2)
		{
			add(ans, binom(c, h1 - c1));
		}
		else
		{
			add(ans, binom(c, h1 - c1));
			add(ans, binom(c, h2 - c1));
		}
		//outln(ans);
	}
	printf("%d\n", ans);
}

int main()
{
	//setIO("");
	prepare(200000);
	int t; read(t); while (t--)
	{
		init();
		solve();
	}
	return 0;
}
