Search in sources :

Example 1 with JoynrSendBufferFullException

use of io.joynr.exceptions.JoynrSendBufferFullException in project joynr by bmwcarit.

the class SerializationTest method serializeReplyWithJoynrSendBufferFullException.

@Test
public void serializeReplyWithJoynrSendBufferFullException() throws IOException {
    JoynrSendBufferFullException error = new JoynrSendBufferFullException(new RejectedExecutionException("cause message"));
    Reply reply = new Reply(UUID.randomUUID().toString(), error);
    String writeValueAsString = objectMapper.writeValueAsString(reply);
    System.out.println(writeValueAsString);
    Reply receivedReply = objectMapper.readValue(writeValueAsString, Reply.class);
    Assert.assertEquals(reply, receivedReply);
}
Also used : Reply(joynr.Reply) JoynrSendBufferFullException(io.joynr.exceptions.JoynrSendBufferFullException) RejectedExecutionException(java.util.concurrent.RejectedExecutionException) Test(org.junit.Test)

Aggregations

JoynrSendBufferFullException (io.joynr.exceptions.JoynrSendBufferFullException)1 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)1 Reply (joynr.Reply)1 Test (org.junit.Test)1