I am writing a test case for invalid URL, and it was working previously but now its not working, here are information about it.
My below test case was working fine previously but after migrating to SpringBoot 3.3.2 and RestAssured 5.4.0 its giving 500 error.
@Test
void return404_with_invalid_uri_E2E() {
given().
contentType(ContentType.JSON).
when().
get("/api/v1/accesories123").
then().
assertThat().
status(HttpStatus.NOT_FOUND);
}
I am getting below error:
java.lang.AssertionError: 1 expectation failed.
Expected status code <404> but was <500>.
1