In unit tests for java + spring, I pass a string with Russian letters to the method. Inside the method, the parameter does not contain what was recorded, for example, the order status is Paid, but the text in the bird's language comes.
String response = sendGet( new String(serverAddress + "/salesOrder?id=1&status=2. Оплачен"); Method itself
private String sendGet(String url) { logger.log(WARN, "prepare sending GET.."); HttpHeaders headers = new HttpHeaders(); headers.add("Content-Type", "application/xml"); logger.log(WARN, url); ResponseEntity responseEntity = restTemplate.exchange( url, HttpMethod.GET, new HttpEntity<>(headers), String.class); return (String) responseEntity.getBody(); } Respectively
- Paid
, and inside the sendGet method and on the server comes a string of something like
- верждение