Search in sources :

Example 1 with MandatoryRecipientsNotAvailableException

use of com.quorum.tessera.transaction.exception.MandatoryRecipientsNotAvailableException in project tessera by ConsenSys.

the class MandatoryRecipientsNotAvailableExceptionMapperTest method toResponse.

@Test
public void toResponse() {
    final MandatoryRecipientsNotAvailableException ex = new MandatoryRecipientsNotAvailableException("OUCH");
    final Response result = instance.toResponse(ex);
    assertThat(result).isNotNull();
    final String message = (String) result.getEntity();
    assertThat(message).isEqualTo("OUCH");
    assertThat(result.getStatus()).isEqualTo(400);
}
Also used : Response(jakarta.ws.rs.core.Response) MandatoryRecipientsNotAvailableException(com.quorum.tessera.transaction.exception.MandatoryRecipientsNotAvailableException) Test(org.junit.Test)

Aggregations

MandatoryRecipientsNotAvailableException (com.quorum.tessera.transaction.exception.MandatoryRecipientsNotAvailableException)1 Response (jakarta.ws.rs.core.Response)1 Test (org.junit.Test)1