@@ -132,7 +132,7 @@ public void perform_valid_query_on_newly_created_aggregated_object() throws Thro
132
132
String actualTestCaseFinishedEventId = responseEntityFormattedJsonNode .get ("aggregatedObject" )
133
133
.get ("testCaseExecutions" ).get (0 ).get ("testCaseFinishedEventId" ).asText ();
134
134
135
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( response .getStatusCodeValue () ));
135
+ assertEquals (HttpStatus .OK .value (), response .getStatusCodeValue ());
136
136
assertEquals (
137
137
"Failed to compare actual Aggregated Object TestCaseFinishedEventId:\n " + actualTestCaseFinishedEventId
138
138
+ "\n with expected Aggregated Object TestCaseFinishedEventId:\n "
@@ -144,7 +144,7 @@ public void perform_valid_query_on_newly_created_aggregated_object() throws Thro
144
144
public void perform_invalid_query_on_created_aggregated_object () throws Throwable {
145
145
final String invalidDocumentId = "6acc3c87-75e0-4aaa-88f5-b1a5d4e6cccc" ;
146
146
final String entryPoint = "/queryAggregatedObject" ;
147
- final String expectedResponse = "{ \" responseEntity \" : \" [] \" } " ;
147
+ final String expectedResponse = "" ;
148
148
149
149
LOGGER .debug ("Trying an invalid query on /queryAggregatedObject RestApi with invalid documentId: "
150
150
+ invalidDocumentId );
@@ -158,7 +158,7 @@ public void perform_invalid_query_on_created_aggregated_object() throws Throwabl
158
158
LOGGER .debug ("Response of /queryAggregatedObject RestApi, Status Code: " + responseStatusCode + "\n Response: "
159
159
+ responseAsString );
160
160
161
- assertEquals (HttpStatus .OK . toString (), Integer . toString ( responseStatusCode ) );
161
+ assertEquals (HttpStatus .NO_CONTENT . value (), responseStatusCode );
162
162
assertEquals ("Differences between actual Aggregated Object:\n " + responseAsString
163
163
+ "\n and expected Aggregated Object:\n " + expectedResponse , expectedResponse , responseAsString );
164
164
}
@@ -197,7 +197,7 @@ public void perform_several_valid_freestyle_queries_on_created_Aggregated_object
197
197
String actualAggrObjId = aggrObjResponse .get ("id" ).asText ();
198
198
LOGGER .debug ("AggregatedObject id from Response: " + actualAggrObjId );
199
199
200
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( response .getStatusCodeValue () ));
200
+ assertEquals (HttpStatus .OK .value (), response .getStatusCodeValue ());
201
201
assertEquals (
202
202
"Failed to compare actual Aggregated Object Id:\n " + actualAggrObjId
203
203
+ "\n with expected Aggregated Object Id:\n " + expectedAggrId ,
@@ -210,7 +210,7 @@ public void perform_invalid_freestyle_query_on_created_aggregated_object() throw
210
210
final String invalidAggrId = "6acc3c87-75e0-4b6d-88f5-b1aee4e62b43" ;
211
211
final String entryPoint = "/query" ;
212
212
final String queryAggrObj = "{\" criteria\" :{\" aggregatedObject.id\" : \" " + invalidAggrId + "\" }}" ;
213
- final String expectedResponse = "[] " ;
213
+ final String expectedResponse = "" ;
214
214
215
215
LOGGER .debug ("Trying an invalid query on /query RestApi with invalid criteria query: " + queryAggrObj );
216
216
@@ -223,7 +223,7 @@ public void perform_invalid_freestyle_query_on_created_aggregated_object() throw
223
223
LOGGER .debug (
224
224
"Response of /query RestApi, Status Code: " + responseStatusCode + "\n Response: " + responseAsString );
225
225
226
- assertEquals (HttpStatus .OK . toString (), Integer . toString ( responseStatusCode ) );
226
+ assertEquals (HttpStatus .NO_CONTENT . value (), responseStatusCode );
227
227
assertEquals ("Differences between actual Aggregated Object:\n " + responseAsString
228
228
+ "\n and expected Aggregated Object:\n " + expectedResponse , expectedResponse , responseAsString );
229
229
}
@@ -264,7 +264,7 @@ public void perform_a_query_for_missed_notification() throws Throwable {
264
264
265
265
String actualTestCaseStartedEventId = responseEntityFormattedJsonNode .get ("testCaseExecutions" )
266
266
.get ("testCaseStartedEventId" ).asText ();
267
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( response .getStatusCodeValue () ));
267
+ assertEquals (HttpStatus .OK .value (), response .getStatusCodeValue ());
268
268
assertEquals ("Differences between actual Missed Notification response TestCaseStartedEventId:\n "
269
269
+ actualTestCaseStartedEventId
270
270
+ "\n and expected Missed Notification response TestCaseStartedEventId:\n "
@@ -291,7 +291,7 @@ public void check_missed_notification_has_been_returned() throws Throwable {
291
291
LOGGER .debug ("Response of /queryMissedNotifications RestApi, Status Code: " + responseStatusCode + "\n Response: "
292
292
+ responseAsString );
293
293
294
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( responseStatusCode ) );
294
+ assertEquals (HttpStatus .OK .value (), responseStatusCode );
295
295
assertEquals (
296
296
"Differences between actual Missed Notification response:\n " + responseAsString
297
297
+ "\n and expected Missed Notification response:\n " + expectedResponse ,
@@ -326,7 +326,7 @@ public void perform_valid_query_and_filter_on_aggregated_object() throws Throwab
326
326
String responseAsString = response .getBody ().toString ();
327
327
int responseStatusCode = response .getStatusCodeValue ();
328
328
329
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( responseStatusCode ) );
329
+ assertEquals (HttpStatus .OK .value (), responseStatusCode );
330
330
assertEquals (
331
331
"Failed to compare actual response:\n " + responseAsString + "\n with expected response:\n "
332
332
+ expectedResponse ,
@@ -374,7 +374,7 @@ public void perform__query_and_filter_with_part_of_path() throws Throwable {
374
374
String responseAsString = response .getBody ().toString ();
375
375
int responseStatusCode = response .getStatusCodeValue ();
376
376
377
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( responseStatusCode ) );
377
+ assertEquals (HttpStatus .OK .value (), responseStatusCode );
378
378
assertEquals (
379
379
"Failed to compare actual response:\n " + responseAsString + "\n with expected response:\n "
380
380
+ expectedResponses .get (pos ),
@@ -413,7 +413,7 @@ public void perform_query_to_retrieve_and_filter_out_confidence_level_informatio
413
413
414
414
JsonNode confidenceLevels = aggrObjResponse .get ("confidenceLevels" ).get (1 );
415
415
416
- assertEquals (HttpStatus .OK .toString (), Integer . toString ( response .getStatusCodeValue () ));
416
+ assertEquals (HttpStatus .OK .value (), response .getStatusCodeValue ());
417
417
assertEquals ("Failed to retrieve the latest confidence level." , "readyForDelivery" ,
418
418
confidenceLevels .get ("name" ).asText ());
419
419
assertEquals ("Failed to retrieve the latest confidence level." , "SUCCESS" ,
0 commit comments