Mr Nikhil has k Children. They are suffering from a disease called Gasomia . 
According to his family Doctor , Child 1 requires atleast x1 tablets , Child 2 requires atleast  x2 ......... Child k requires atleast xk tablets.
As Nikhil got job in Golden Ship,he bought m tablets and wants to distribute all the tablets among his children.Can you tell him the number of ways of distributing tablets among children in such a way,that all the children get satisfied.
As the numbers of ways can be very large, print ans mod 1000000007

Input
First line of the input contains T , denoting number of test cases

For each test case it  contains two integers k and m denoting— number of children and the number of tablets he have respectively.

Then follow k  numbers , denoting minimum tablets needed by child i, 1≤ i ≤ k

Output
Print the number of ways % 1000000007.

SAMPLE INPUT
1
2 3
1 1

SAMPLE OUTPUT
2

Explanation

In the Sample Test Case ,Nikhil has 2 children x1 and x2 and he bought 3 tablets.
x1 needs atleast 1 tablet
x2 needs atleast 1 tablet
so he can distribute in 2 ways i.e (1,2) and (2,1)
'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
#print 'Hello World!'
def f (n,r,m):
	fac=1
	rfac=1
	for i in range(1,r+1):
		fac=(fac*(n-r+i))
		rfac=rfac*i
	return (fac/rfac)%m
t=input()
while t>0:
	t-=1
	n,m=map(int,raw_input().split())
	l=[int(i) for i in raw_input().split()]
	s=m-sum(l)
	if s==0:
		print "1"
	else:
		if s<0:
			print "0"
		else:
			print f(n+s-1,n-1,1000000007)