### Question:
RawCall { public static RawCall fromJson(String json) { try { return new RawCall(ObjectMapperHolder.JSON_OBJECT_MAPPER.readValue(json, new TypeReference<List<Object>>(){})); } catch (IOException e) { LOGGER.error("Unable to deserialize call", e); throw new DeserializeException("Unable to deserialize call: " + json, e); } } RawCall(List<Object> fields); static RawCall fromJson(String json); static RawCall of(List<Object> fields); MessageType getMessageType(); String getMessageId(); Object getPayload(); String getActionType(); String toJson(); @Override String toString();  }### Answer:
@Test void shouldThrowExceptionOnUnknownMessageType() { String unknownId = "unknownId"; String json = "[\"" + unknownId + "\",\"19223201\", { \"currentTime\": \"2013-02-01T20:53:32.486Z\", \"interval\": 300, \"status\": \"Accepted\"} ]"; RawCall rawCall = RawCall.fromJson(json); assertThatThrownBy(rawCall::getPayload).hasMessage("Unable to parse message type: unknownId"); }
@Test void shouldThrowExceptionOnFieldValueTypeMismatch() { String json = "[3,19223201, { \"currentTime\": \"2013-02-01T20:53:32.486Z\", \"interval\": 300, \"status\": \"Accepted\"} ]"; RawCall rawCall = RawCall.fromJson(json); assertThatThrownBy(rawCall::getMessageId).hasMessage("Field value type 'java.lang.Integer' does not correspond to required 'java.lang.String'"); }