Reformat code using Eclipse Mars

This commit is contained in:
Phillip Webb
2015-10-07 23:37:10 -07:00
parent e473364e4e
commit c9fb9916b8
408 changed files with 2831 additions and 2652 deletions

View File

@@ -57,8 +57,8 @@ public class SampleJetty93ApplicationTests {
@Test
public void testHome() throws Exception {
ResponseEntity<String> entity = new TestRestTemplate().getForEntity(
"http://localhost:" + this.port, String.class);
ResponseEntity<String> entity = new TestRestTemplate()
.getForEntity("http://localhost:" + this.port, String.class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
assertEquals("Hello World", entity.getBody());
}
@@ -69,11 +69,12 @@ public class SampleJetty93ApplicationTests {
requestHeaders.set("Accept-Encoding", "gzip");
HttpEntity<?> requestEntity = new HttpEntity<Object>(requestHeaders);
RestTemplate restTemplate = new TestRestTemplate();
ResponseEntity<byte[]> entity = restTemplate.exchange("http://localhost:"
+ this.port, HttpMethod.GET, requestEntity, byte[].class);
ResponseEntity<byte[]> entity = restTemplate.exchange(
"http://localhost:" + this.port, HttpMethod.GET, requestEntity,
byte[].class);
assertEquals(HttpStatus.OK, entity.getStatusCode());
GZIPInputStream inflater = new GZIPInputStream(new ByteArrayInputStream(
entity.getBody()));
GZIPInputStream inflater = new GZIPInputStream(
new ByteArrayInputStream(entity.getBody()));
try {
assertEquals("Hello World",
StreamUtils.copyToString(inflater, Charset.forName("UTF-8")));