Search in sources :

Example 1 with EnclaveNotAvailableException

use of com.quorum.tessera.enclave.EnclaveNotAvailableException in project tessera by ConsenSys.

the class EnclaveNotAvailableExceptionMapperTest method toResponse.

@Test
public void toResponse() {
    final EnclaveNotAvailableException exception = new EnclaveNotAvailableException("Enclave error");
    final Response result = instance.toResponse(exception);
    assertThat(result).isNotNull();
    assertThat(result.getStatus()).isEqualTo(503);
    assertThat(result.getEntity()).isEqualTo(exception.getMessage());
}
Also used : Response(jakarta.ws.rs.core.Response) EnclaveNotAvailableException(com.quorum.tessera.enclave.EnclaveNotAvailableException) Test(org.junit.Test)

Aggregations

EnclaveNotAvailableException (com.quorum.tessera.enclave.EnclaveNotAvailableException)1 Response (jakarta.ws.rs.core.Response)1 Test (org.junit.Test)1