In our project, we do large use of WSClient to call external APIs.
As suggested here https://www.playframework.com/documentation/2.6.x/JavaTestingWebServiceClients ,
we are starting an internal server, and testing the WSClient against the server.
The problem is that, for each test, we need to setup a new server, to serve a different resource
server = Server.forRouter((components) -> RoutingDsl.fromComponents(components) .POST("/").routeTo(() -> ok().sendResource("resource1.json") ).build() );
and this takes a few seconds each time (2-4 seconds), so the test suite is becoming sloooow.
Any suggestions to speed up the tests?