Originally posted by marc weber:
Well, without more information, it seems most likely to me that the element beng added is a duplicate. If that's true and it shouldn't be, then look at the object's equals method. Beyond that, you could look for problems with the getRequests and addRequest methods. Or maybe the assertTrue method itself has a problem.
I have to respectfully disagree
It seems far more likely to me that policyBll has a single Requests set that is returns through the getRequests() call. The addRequest() merely adds the RequestBil object to the that set. In other words, Requests == newRequests, so 'newRequests.size() > Requests.size()' is the same as ' newRequests.size() > newRequests.size()'. It will never be true.