From c774676fe64e2848f4cbe4ac6768982f1a899507 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Wed, 15 Jan 2025 10:26:45 +0100 Subject: [PATCH] fix handleJpaObjectRetrievalFailureExceptionWithDisplayName test --- .../errors/RestResponseEntityExceptionHandlerUnitTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandlerUnitTest.java b/src/test/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandlerUnitTest.java index e54eac1e..8675e6f6 100644 --- a/src/test/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandlerUnitTest.java +++ b/src/test/java/net/hostsharing/hsadminng/errors/RestResponseEntityExceptionHandlerUnitTest.java @@ -81,8 +81,7 @@ class RestResponseEntityExceptionHandlerUnitTest { void handleJpaObjectRetrievalFailureExceptionWithDisplayName() { // given final var givenException = new JpaObjectRetrievalFailureException( - new EntityNotFoundException( - "Unable to find net.hostsharing.hsadminng.hs.office.partner.HsOfficePartnerEntity with id 12345-123454") + new EntityNotFoundException("Unable to find Entity with id 12345-123454") ); final var givenWebRequest = mock(WebRequest.class); @@ -91,7 +90,7 @@ class RestResponseEntityExceptionHandlerUnitTest { // then assertThat(errorResponse.getBody().getStatusCode()).isEqualTo(400); - assertThat(errorResponse.getBody().getMessage()).isEqualTo("ERROR: [400] Unable to find Partner with uuid 12345-123454"); + assertThat(errorResponse.getBody().getMessage()).isEqualTo("ERROR: [400] Unable to find Entity with id 12345-123454"); } @Test