@Test void unserializeMinimalObject() { Optional<MentionEventParams> actual = this.objectMapper.unserialize("{}"); assertTrue(actual.isPresent()); assertEquals(new MentionEventParams(), actual.get()); }
@Override public Optional<MentionEventParams> unserialize(String data) { try { MentionEventParams mentionEventParams = this.objectMapper.readValue(new StringReader(data), MentionEventParams.class); return Optional.of(mentionEventParams); } catch (IOException e) { this.logger.warn("Failed to parse [{}]. Cause [{}].", data, getRootCauseMessage(e)); return Optional.empty(); } }
DefaultMentionsNotificationsObjectMapper implements MentionsNotificationsObjectMapper, Initializable { @Override public Optional<MentionEventParams> unserialize(String data) { try { MentionEventParams mentionEventParams = this.objectMapper.readValue(new StringReader(data), MentionEventParams.class); return Optional.of(mentionEventParams); } catch (IOException e) { this.logger.warn("Failed to parse [{}]. Cause [{}].", data, getRootCauseMessage(e)); return Optional.empty(); } } }
DefaultMentionsNotificationsObjectMapper implements MentionsNotificationsObjectMapper, Initializable { @Override public Optional<MentionEventParams> unserialize(String data) { try { MentionEventParams mentionEventParams = this.objectMapper.readValue(new StringReader(data), MentionEventParams.class); return Optional.of(mentionEventParams); } catch (IOException e) { this.logger.warn("Failed to parse [{}]. Cause [{}].", data, getRootCauseMessage(e)); return Optional.empty(); } }  }
DefaultMentionsNotificationsObjectMapper implements MentionsNotificationsObjectMapper, Initializable { @Override public Optional<MentionEventParams> unserialize(String data) { try { MentionEventParams mentionEventParams = this.objectMapper.readValue(new StringReader(data), MentionEventParams.class); return Optional.of(mentionEventParams); } catch (IOException e) { this.logger.warn("Failed to parse [{}]. Cause [{}].", data, getRootCauseMessage(e)); return Optional.empty(); } }  @Override Optional<MentionEventParams> unserialize(String data); @Override Optional<String> serialize(MentionEventParams params); @Override void initialize(); }
DefaultMentionsNotificationsObjectMapper implements MentionsNotificationsObjectMapper, Initializable { @Override public Optional<MentionEventParams> unserialize(String data) { try { MentionEventParams mentionEventParams = this.objectMapper.readValue(new StringReader(data), MentionEventParams.class); return Optional.of(mentionEventParams); } catch (IOException e) { this.logger.warn("Failed to parse [{}]. Cause [{}].", data, getRootCauseMessage(e)); return Optional.empty(); } }  @Override Optional<MentionEventParams> unserialize(String data); @Override Optional<String> serialize(MentionEventParams params); @Override void initialize();  }