test case for gamma error with small nbr of documents