Copied from testing-helpers/wicket-test-utils