wiremock / wiremock-grpc-extension

WireMock Extension: gRPC mocking
https://wiremock.org/docs/grpc/
Apache License 2.0
15 stars 9 forks source link

NoSuchMethod Error: java.lang.Object com.githum.tomakehurst.wiremock.common,Exceptions.uncheck(java.util.Callable, java.lang.Class) #123

Open rajacksjr opened 2 weeks ago

rajacksjr commented 2 weeks ago

Proposal

I have implemented a unit test to test out my GRPC application. I am building my project using Maven, and am using version 3.9.2 of the wiremock-standalone and version 0.8.1 of the wiremock-grpc-extension libraries. The error is occurring in the 'public String toJson(MessageOrBuilder message)method in the JsonMessageConverter class of the wiremock-grpc-extensions library, line 35. ThetoJsonmethod is calling thepublic static uncheck(Callable work, Class returnType)' method as follows.

I did notice that the public <T extends Message, B extends Message.Builder> T toMessage(String json, B builder) method in the JsonMessageConverter class is using the @SuppressWarnings("unchecked") annotation. Should the 'public String toJson(MessageOrBuilder message)` method be doing the same thing?

Reproduction steps

To reproduce the problem, create a unit test that generates a response message using a com.google.protobuf.MessageOrBuilder class object instead of building a response message via JSON.

References

No response