#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) (x).begin(), (x).end()
#define f(i, n) for (int i = 0; i < n; i++)
#define trace(x) cerr << #x << ": " << x << '\n'
const int M = 1e9 + 7;
ll n, k;
map<tuple<ll, ll, ll>, ll> dp;
ll fun(ll i, ll s, ll f, vector<ll> &v)
{
if (i == n)
{
return f and s >= k;
}
if (dp.find({i, s, f}) != dp.end())
{
return dp[{i, s, f}];
}
ll ans = 0;
ans += fun(i + 1, s, 1, v);
ans %= M;
ans += fun(i + 1, s + v[i], f, v);
ans %= M;
return dp[{i, s, f}] = ans;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while (t--)
{
cin >> n >> k;
vector<ll> v(n);
for (auto &a : v)
cin >> a;
dp.clear();
cout << fun(0, 0, 0, v) << endl;
}
return 0;
}