fixed the contain(exactly()) matcher when there are no elements to check

fixed the contain(exactly()) matcher when there are no elements to check