Please, remove the 3 lines above. I think it's better to use the geoserver connection data configured in the xml. I was confused when I launched the test and it tried to connect to http://localhost:8081/geoserver, when in the xml the 8080 port was specified.