Visit our archive

Say you have a arbitrary class under test, which is dependent on a class DataProcessor which has a method with the following signature:

you might want to stub it with Mockito 1.9.5 in the following way to match the generic typed class:

However running this, gives the following error:

This is caused by the generic typed MulitvaluedMap.

Solution:

Run the test and it will pass (these lines at least :-)!

  • Name (Required)

  • Email (Required, but not published)

  • Url (Optional)

  • Comment (Required)