EasyMock, like other JUnit mock testers, allows you to set expectations for method calls on the mocked object.  However, the expect() method wants to see a return type from the method call.  So, what to do?

A built-in mechanism of EasyMocks is to just “call” the void method in question.  For example a commonly mocked object is the HttpSession:

    session.setAttribute(eq(name), isA(InSession.class));
    //whatever you are really trying to test

Could only be easier if the doc told you this clearly.