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.
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)uncheck(Callable work, Class returnType)' method as follows.
method in the JsonMessageConverter class of the wiremock-grpc-extensions library, line 35. The
toJsonmethod is calling the
public staticreturn Exceptions.uncheck(() -> jsonPrinter.print(message), String.class)
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