Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mockito Help - Problem to sort a List of mock objects.

 
robson vargas
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers.

Im using mockito to build some unit tests, as the fallow code can show:



This tests work fine. But.. look the little change:



Then i got a big NullPointerException into my compare method, in the moment that the "getState" is invoked. (o1.checkAt(States.NONE).getState() )

So i ask you, why the "getState" work if its on the test scope but fail if its on the comparator scope ?


Thanks in adv.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic