You could try out PowerMock (www.powermock.org), it allows you to mock final
classes/methods easily if you're used to EasyMock.

On Fri, Oct 24, 2008 at 7:20 AM, Barrie Treloar <[EMAIL PROTECTED]> wrote:

> I wanted to write a unit test that showed
> AbstractPollingIoProcessor.write() threw an exception that the
> WriteFuture doesn't get notified.
>
> But all the places I would sneak in such a change for testing have been
> denied.
> The classes I want to modify are final or the methods I want to modify
> are final.
>
> Am I just missing something?
> Looking at a lot of unit tests they are only testing "happy days"
> scenarios.
> Exceptional flows don't seem to be checked.
>
> Suggestions welcome.
> Thanks
>

Reply via email to