Ravi Kiran V wrote: please tell me how to test the contents of List at once , Means i dont want
I'm not sure what you're asking for. How will you test the contents of the list without... testing the contents of the list? If you're looking for a more generic way to test the contents of the list, then refactor out a method that does the comparison (or create your own assertion as already suggested, which might be a good idea if you're doing it a lot).