I’m attempting to write a Java Servlet unit test to send binary data http requests to the servlet and receive a binary response. Usually I use the jetty ServletTester and HttpTester to unit test servlets, but HttpTester doesn’t seems to support binary requests yet.
Any ideas how can I unit test a binary servlet in java?
Seems in Jetty 8 HttpTester store content in binary format.
You may extend HttpTester and set _genContent manually(it is protected). Or you can interpret the bytes as String with the same charset as in HttpTester.