dimanche 3 avril 2016

SpringMVC unit test for rest service

I got this error: the method when(t) in the type mockito is not applicable for the arguments <void> in following test line:

Mockito.when(entityService.deleteEntity(id)).thenReturn("");

The deleteEntity method returns void.

I don't understand and cannot solve this error. Can someone guide me to the bright side of knowledge?

Aucun commentaire:

Enregistrer un commentaire