@Test void getUpdatedJsonMessagePartShouldThrowIfFlagsIsNull() { MessageToElasticSearchJson messageToElasticSearchJson = new MessageToElasticSearchJson( new DefaultTextExtractor(), ZoneId.of("Europe/Paris"), IndexAttachments.YES); assertThatThrownBy(() -> messageToElasticSearchJson.getUpdatedJsonMessagePart(null, MOD_SEQ)) .isInstanceOf(NullPointerException.class); }
public String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq) throws JsonProcessingException { Preconditions.checkNotNull(flags); return mapper.writeValueAsString(new MessageUpdateJson(flags, modSeq)); }
MessageToElasticSearchJson { public String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq) throws JsonProcessingException { Preconditions.checkNotNull(flags); return mapper.writeValueAsString(new MessageUpdateJson(flags, modSeq)); } }
MessageToElasticSearchJson { public String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq) throws JsonProcessingException { Preconditions.checkNotNull(flags); return mapper.writeValueAsString(new MessageUpdateJson(flags, modSeq)); } MessageToElasticSearchJson(TextExtractor textExtractor, ZoneId zoneId, IndexAttachments indexAttachments); @Inject  MessageToElasticSearchJson(TextExtractor textExtractor, IndexAttachments indexAttachments); }
MessageToElasticSearchJson { public String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq) throws JsonProcessingException { Preconditions.checkNotNull(flags); return mapper.writeValueAsString(new MessageUpdateJson(flags, modSeq)); } MessageToElasticSearchJson(TextExtractor textExtractor, ZoneId zoneId, IndexAttachments indexAttachments); @Inject  MessageToElasticSearchJson(TextExtractor textExtractor, IndexAttachments indexAttachments); String convertToJson(MailboxMessage message, List<Username> usernames); String convertToJsonWithoutAttachment(MailboxMessage message, List<Username> usernames); String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq); }
MessageToElasticSearchJson { public String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq) throws JsonProcessingException { Preconditions.checkNotNull(flags); return mapper.writeValueAsString(new MessageUpdateJson(flags, modSeq)); } MessageToElasticSearchJson(TextExtractor textExtractor, ZoneId zoneId, IndexAttachments indexAttachments); @Inject  MessageToElasticSearchJson(TextExtractor textExtractor, IndexAttachments indexAttachments); String convertToJson(MailboxMessage message, List<Username> usernames); String convertToJsonWithoutAttachment(MailboxMessage message, List<Username> usernames); String getUpdatedJsonMessagePart(Flags flags, ModSeq modSeq);  }