### Question:
Event { public MessageStatusEvent ofMessageStatus() { return (MessageStatusEvent) this; } protected  Event( EventType type, String id, ZonedDateTime timestamp, String subscriptionId, ChannelType channel ); MessageEvent ofMessage(); MessageStatusEvent ofMessageStatus(); final EventType type; final String id; @JsonDeserialize( using = ZonedDateTimeDeserializer.class )
	@JsonSerialize( using = ZonedDateTimeSerializer.class )
	@JsonFormat( pattern = "yyyy-MM-dd'T'HH:mm:ss[.SSS]XXX" )
	final ZonedDateTime timestamp; final String subscriptionId; final ChannelType channel; }### Answer:
@Test public void messageStatusEventDeserialization() throws IOException { Event event = jsonMapper.readValue( "{\"id\":\"some-event-id\",\"timestamp\":\"2019-06-03T15:50:43-03:00\",\"type\":\"MESSAGE_STATUS\",\"subscriptionId\":\"some-subs-id\",\"channel\":\"whatsapp\",\"messageId\":\"some-message_id\",\"contentIndex\":0,\"messageStatus\":{\"timestamp\":\"2019-06-10T15:30:35-03:00\",\"code\":\"REJECTED\",\"description\":\"This is a error description\",\"causes\":[{\"channelErrorCode\":500,\"reason\":\"Template id acb94998-896b-11e9-96f7-cb86a027e9fc cannot be found or does not belongs to organizationId ORGANIZATION_ID_B\"}]}}".getBytes( StandardCharsets.UTF_8 ), Event.class ); assertNotNull( event ); assertEquals( EventType.MESSAGE_STATUS, event.type ); assertEquals( "some-event-id", event.id ); assertEquals( "some-subs-id", event.subscriptionId ); assertEquals( ChannelType.whatsapp, event.channel ); assertEquals( MessageStatusEvent.class, event.getClass() ); MessageStatusEvent messageStatusEvent = event.ofMessageStatus(); assertEquals( "some-message_id", messageStatusEvent.messageId ); assertEquals( Integer.valueOf(0), messageStatusEvent.contentIndex ); assertEquals( MessageStatusCode.REJECTED, messageStatusEvent.messageStatus.code ); assertEquals( "This is a error description", messageStatusEvent.messageStatus.description ); assertEquals( 1, messageStatusEvent.messageStatus.causes.size() ); Cause cause = messageStatusEvent.messageStatus.causes.get(0); assertEquals( "500", cause.channelErrorCode ); assertEquals( "Template id acb94998-896b-11e9-96f7-cb86a027e9fc cannot be found or does not belongs to organizationId ORGANIZATION_ID_B", cause.reason ); }