I have this piece of code:
new Expectations(){
{
mFubar.getModel();
result = new Model();
times = 1;
mFubar.getModel().getAllDogs();
result = new HashSet<Dogs>();
times = 1;
}
};
Unfortunately I always get a null value for mFubar.getModel()
.
How can I create a mock value for getModel()
so mFubar.getModel().getAllDogs();
works correctly?