That my tests will not be equivalent is no big problem. In this case I am
really unit testing the pages while mocking the backend. That allows me to
also test anomalous behavior of the backend.

In addition, I am also doing unit integration testing with rendering wicket
pages with an actual JPA backend with a relatively complete environment
including transactions and JPA. So, overall my unit tests cover the
functionality quite well.

The trick I am doing now is storing the mock in a static variable of the
test class and then creating a serializable proxy using LookupProxyFactory (
to lookup the mock dynamically. I guess this is screaming again for another
test utility on top of mockito for creating serializable mocks (if I cannot
solve it in wicket).

Any suggestions on how to disable serialization in wicket tester?

Reply via email to