mardi 29 décembre 2015

Mock Date object using Mockito

A method of MyService class returns java.util.Date object and MyManager class is calling that method of MyService class. I am writing the test case for MyManager class.
when I mock

Mockito.when(manager.getDate())).thenReturn((Date)Mockito.any())

is not working. Could some one help me on this please?

Aucun commentaire:

Enregistrer un commentaire