Polishing
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.web.client;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -77,7 +78,7 @@ public class AbstractJettyServerTestCase {
|
||||
jettyServer = new Server(0);
|
||||
|
||||
ServletContextHandler handler = new ServletContextHandler();
|
||||
byte[] bytes = helloWorld.getBytes("utf-8");
|
||||
byte[] bytes = helloWorld.getBytes(StandardCharsets.UTF_8);
|
||||
handler.addServlet(new ServletHolder(new GetServlet(bytes, textContentType)), "/get");
|
||||
handler.addServlet(new ServletHolder(new GetServlet(new byte[0], textContentType)), "/get/nothing");
|
||||
handler.addServlet(new ServletHolder(new GetServlet(bytes, null)), "/get/nocontenttype");
|
||||
|
||||
@@ -119,7 +119,6 @@ public class AsyncRestTemplateIntegrationTests extends AbstractJettyServerTestCa
|
||||
assertNull("Invalid content", entity.getBody());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void getNoContentTypeHeader() throws Exception {
|
||||
Future<ResponseEntity<byte[]>> futureEntity = template.getForEntity(baseUrl + "/get/nocontenttype", byte[].class);
|
||||
@@ -127,7 +126,6 @@ public class AsyncRestTemplateIntegrationTests extends AbstractJettyServerTestCa
|
||||
assertArrayEquals("Invalid content", helloWorld.getBytes("UTF-8"), responseEntity.getBody());
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void getNoContent() throws Exception {
|
||||
Future<ResponseEntity<String>> responseFuture = template.getForEntity(baseUrl + "/status/nocontent", String.class);
|
||||
|
||||
Reference in New Issue
Block a user