Mock it..

If you try to mock a method that returns primitive types, eclipse gives following compiler Error :

The expression of type boolean is boxed into Boolean

to get rid of this error :

Globally: Window-> Preferences: Java-> Compiler-> Errors / Warnings-> Potential programming problems-> Boxing and unboxing conversions. 
For the project: Properties: Java Compiler-> Errors / Warnings-> further as well.

Source :