@@ -74,7 +74,6 @@ public void performGet() {
74
74
.andRespond (withSuccess (responseBody , MediaType .APPLICATION_JSON ));
75
75
76
76
Person ludwig = this .restTemplate .getForObject ("/composers/{id}" , Person .class , 42 );
77
-
78
77
assertThat (ludwig .getName ()).isEqualTo ("Ludwig van Beethoven" );
79
78
assertThat (ludwig .getSomeDouble ()).isEqualTo (1.6035 );
80
79
@@ -93,8 +92,9 @@ public void performGetManyTimes() {
93
92
this .mockServer .expect (manyTimes (), requestTo ("/composers/42" )).andExpect (method (HttpMethod .GET ))
94
93
.andRespond (withSuccess (responseBody , MediaType .APPLICATION_JSON ));
95
94
96
- @ SuppressWarnings ("unused" )
97
95
Person ludwig = this .restTemplate .getForObject ("/composers/{id}" , Person .class , 42 );
96
+ assertThat (ludwig .getName ()).isEqualTo ("Ludwig van Beethoven" );
97
+ assertThat (ludwig .getSomeDouble ()).isEqualTo (1.6035 );
98
98
99
99
// We are only validating the request. The response is mocked out.
100
100
// hotel.getId() == 42
@@ -169,13 +169,8 @@ public void verify() {
169
169
this .mockServer .expect (requestTo ("/number" )).andExpect (method (HttpMethod .GET ))
170
170
.andRespond (withSuccess ("8" , MediaType .TEXT_PLAIN ));
171
171
172
- @ SuppressWarnings ("unused" )
173
- String result1 = this .restTemplate .getForObject ("/number" , String .class );
174
- // result1 == "1"
175
-
176
- @ SuppressWarnings ("unused" )
177
- String result2 = this .restTemplate .getForObject ("/number" , String .class );
178
- // result == "2"
172
+ assertThat (this .restTemplate .getForObject ("/number" , String .class )).isEqualTo ("1" );
173
+ assertThat (this .restTemplate .getForObject ("/number" , String .class )).isEqualTo ("2" );
179
174
180
175
try {
181
176
this .mockServer .verify ();
0 commit comments