When trying to use a global WiremockServer in a test inside a nested test class annotated with @Nested, the test cannot invoke any stubs because the WiremockServer is null.
I get the below running in a nested class, but without the nesting then the tests run fine and the wiremock works as expected.
java.lang.NullPointerException: Cannot invoke "com.github.tomakehurst.wiremock.WireMockServer.stubFor(com.github.tomakehurst.wiremock.client.MappingBuilder)" because "this.this$0.graphWiremock" is null
Hi @calnighters
Can you share your test setup? I've tried to reproduce and I couldn't. Verify if this is still an issue, if so share some snippet.
Thank you.
When trying to use a global WiremockServer in a test inside a nested test class annotated with @Nested, the test cannot invoke any stubs because the WiremockServer is null. I get the below running in a nested class, but without the nesting then the tests run fine and the wiremock works as expected.
java.lang.NullPointerException: Cannot invoke "com.github.tomakehurst.wiremock.WireMockServer.stubFor(com.github.tomakehurst.wiremock.client.MappingBuilder)" because "this.this$0.graphWiremock" is null