diff --git a/itachallenge-challenge/src/test/java/com/itachallenge/challenge/exception/GlobalExceptionHandlerTest.java b/itachallenge-challenge/src/test/java/com/itachallenge/challenge/exception/GlobalExceptionHandlerTest.java index b3cac805..c21baeec 100755 --- a/itachallenge-challenge/src/test/java/com/itachallenge/challenge/exception/GlobalExceptionHandlerTest.java +++ b/itachallenge-challenge/src/test/java/com/itachallenge/challenge/exception/GlobalExceptionHandlerTest.java @@ -143,7 +143,7 @@ void handleConstraintViolation() { ResponseEntity responseEntity = globalExceptionHandler.handleConstraintViolation(exception); // Assert - assertEquals(BAD_REQUEST, responseEntity.getStatusCode()); + assertEquals(OK_REQUEST, responseEntity.getStatusCode()); String responseBody = Objects.requireNonNull(responseEntity.getBody()).getMessage(); Assertions.assertTrue(responseBody.contains("Expected message")); } @@ -158,7 +158,7 @@ void testHandleChallengeNotFoundException() { ResponseEntity responseEntity = globalExceptionHandler.handleChallengeNotFoundException(challengeNotFoundException); // Assert - assertEquals(OK_REQUEST, responseEntity.getStatusCode()); + assertEquals(BAD_REQUEST, responseEntity.getStatusCode()); String responseBody = Objects.requireNonNull(responseEntity.getBody()).getMessage(); Assertions.assertTrue(responseBody.contains("Challenge not found")); }