so the only logic is the private mapper method, i have 3 options for testing this which is better
1) make the method protected
2) make it a mapper class
3) spy on the variables sent to the diaryService.update method.
i suppose there is option 4, refactor the code to remove this whole problem, but I have no idea how that could be done.
I'm not talking about mocking, I'm talking about accessing. And I have been in the same situation - after having used "extract method" enough in your IDE to separate the different levels of abstraction.
I do, however, tend to agree with you in this case. The builder is the better option. The private method doesn't seem to contains something that's to be considered private to this class.
There's a hole in the bucket, dear Liza, dear Liza, a hole in the bucket, dear liza, a tiny ad: