[undertow-dev] HttpServerExchange

Greg Hellings greg.hellings at gmail.com
Thu Oct 8 12:41:03 EDT 2015


I'm trying to mock out the HttpServerExchange object in my tests, but
I apparently cannot do so because the class is declared final. Why is
it final? Does that give Undertow anything beneficial?

If there's good reason to not remove the final, I can just wrap the
object in a proxy class that's not final, but I'd rather not do that
just to get around limitations in mocking. Another alternative would
be for me to skip unit tests on the handler methods and leverage
integration tests.But there are sometimes bits of logic in the handler
that I want to Unit Test directly.

Any help would be appreciated.

--Greg


More information about the undertow-dev mailing list