@Test void getSerializedMessageIdIfSupportedByUnderlyingStorageOrNullForValidMessageIdShouldReturnSerializedId() { String messageIdString = "http: MessageId messageId = mock(MessageId.class); when(messageId.serialize()).thenReturn(messageIdString); when(messageId.isSerializable()).thenReturn(true); MailboxMessage message = mock(MailboxMessage.class); when(message.getMessageId()) .thenReturn(messageId); String serialiazedMessageId = SearchUtil.getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(message); assertThat(messageIdString).isEqualTo(serialiazedMessageId); }
public static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage) { MessageId messageId = mailboxMessage.getMessageId(); if (messageId != null && messageId.isSerializable()) { return messageId.serialize(); } return null; }
SearchUtil { public static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage) { MessageId messageId = mailboxMessage.getMessageId(); if (messageId != null && messageId.isSerializable()) { return messageId.serialize(); } return null; } }
SearchUtil { public static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage) { MessageId messageId = mailboxMessage.getMessageId(); if (messageId != null && messageId.isSerializable()) { return messageId.serialize(); } return null; }  }
SearchUtil { public static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage) { MessageId messageId = mailboxMessage.getMessageId(); if (messageId != null && messageId.isSerializable()) { return messageId.serialize(); } return null; }  static String getDisplayAddress(Mailbox mailbox); static String getDisplayAddress(String headerValue); static String getMailboxAddress(Mailbox mailbox); static String getMailboxAddress(String headerValue); static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage); static String getBaseSubject(String subject); static Predicate<MessageId> distinct(); }
SearchUtil { public static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage) { MessageId messageId = mailboxMessage.getMessageId(); if (messageId != null && messageId.isSerializable()) { return messageId.serialize(); } return null; }  static String getDisplayAddress(Mailbox mailbox); static String getDisplayAddress(String headerValue); static String getMailboxAddress(Mailbox mailbox); static String getMailboxAddress(String headerValue); static String getSerializedMessageIdIfSupportedByUnderlyingStorageOrNull(MailboxMessage mailboxMessage); static String getBaseSubject(String subject); static Predicate<MessageId> distinct();  }