Search in sources :

Example 6 with TransactionNotFoundException

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

the class TransactionNotFoundExceptionMapperTest method toResponse.

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

Aggregations

TransactionNotFoundException (com.quorum.tessera.transaction.exception.TransactionNotFoundException)6 PublicKey (com.quorum.tessera.encryption.PublicKey)5 Test (org.junit.Test)3 EncryptedTransaction (com.quorum.tessera.data.EncryptedTransaction)1 EncryptedTransactionDAO (com.quorum.tessera.data.EncryptedTransactionDAO)1 MessageHash (com.quorum.tessera.data.MessageHash)1 Discovery (com.quorum.tessera.discovery.Discovery)1 Enclave (com.quorum.tessera.enclave.Enclave)1 EncodedPayload (com.quorum.tessera.enclave.EncodedPayload)1 PrivacyMode (com.quorum.tessera.enclave.PrivacyMode)1 Nonce (com.quorum.tessera.encryption.Nonce)1 ResendRequest (com.quorum.tessera.recovery.resend.ResendRequest)1 ResendResponse (com.quorum.tessera.recovery.resend.ResendResponse)1 com.quorum.tessera.recovery.workflow (com.quorum.tessera.recovery.workflow)1 EnhancedPrivacyNotSupportedException (com.quorum.tessera.transaction.exception.EnhancedPrivacyNotSupportedException)1 RecipientKeyNotFoundException (com.quorum.tessera.transaction.exception.RecipientKeyNotFoundException)1 PayloadPublisher (com.quorum.tessera.transaction.publish.PayloadPublisher)1 Response (jakarta.ws.rs.core.Response)1 java.util (java.util)1 Collectors (java.util.stream.Collectors)1