I am trying to mock an object. In that I have a method which returns Boolean value. I construct this mock object several times. So I had to use allowing on the certain methods. I want the return value to be true as and when I pass the object id, in my case acronym. For all the remaining acronyms that are there in the test data it has to return false. But I don't know the usage of allowing will return .Following is the code.
What I want to see happen is,
But its not working, it gives unexpected value exception because its neither true nor false for other issues and years.
I have like 5 more test data for different years and issue code, and I am not concerned about those. I simply want them to return false so they are ignored.
My main functionality returns false so I believe the functionality itself is working good. But I am not able to mock it right.