### Question:
MessageSerializer { @SuppressWarnings("unchecked") public static <E extends Message> E deserialize(String msg) { try { Map<String, Object> m = objectMapper.readValue(msg, Map.class); String messageType = (String) m.get("messageType"); if (messageType == null) { throw new IllegalStateException("messageType not found: " + m); } return (E) objectMapper.convertValue(m, MessageType.valueOf(messageType).getClazz()); } catch (Exception e) { throw new RuntimeException(e); } } private  MessageSerializer(); @SuppressWarnings("unchecked") static E deserialize(String msg); static String serialize(Message msg);  }### Answer:
@Test public void testUnknownProperties() { String str = "{\"sessionToken\":\"123123\", \"correlationId\":123, \"processId\":\"b26a60c6-b54e-4f4d-bf0a-abafb908bf76\", \"messageType\":\"PROCESS_RESPONSE\"}"; ProcessResponse rDeserialized = MessageSerializer.deserialize(str); assertEquals(123, rDeserialized.getCorrelationId()); }