"You don't need it - this is a CodeSmell?" JohnNolan suggested that this might be because one of your objects need splitting
In the end, inspired by a suggestion from CharlesWeir and some of the correspondence on Egroups, we came up with a working compromise:
make ExpectationObject's in MockObjects public. Don't bother with getters and setters, get the names right and talk to the instance variables directly. This will be easier in the next edition of the BigBenTools because we've unified some of the API.
The unit test code should now look something like:
public void testMethod() {
MockThingy? thingy = new MockThingy?();
thingy.myFoo.setExpected(new First());
thingy.myBar.setExpected(new Second());
thingy.myBlob.doNotVerify();
myTarget.doTheThing(thingy);
thingy.verify(); // only verifies thingy.myFoo and thingy.myBar, not thingy.myBlob
}