Message implements Comparable<Message> { protected Message() { } protected  Message(); @NonNull String getMessageId(); @NonNull String getMessageUrl(); @NonNull String getMessageBodyUrl(); @NonNull String getMessageReadUrl(); @NonNull String getTitle(); boolean isRead(); @NonNull Date getSentDate(); long getSentDateMS(); @Nullable Date getExpirationDate(); @Nullable Long getExpirationDateMS(); boolean isExpired(); @NonNull Bundle getExtras(); @NonNull Map<String, String> getExtrasMap(); void markRead(); void markUnread(); void delete(); @NonNull JsonValue getRawMessageJson(); boolean isDeleted(); @Nullable String getListIconUrl(); @Override int compareTo(@NonNull Message another); @Override boolean equals(@Nullable Object o); @Override int hashCode();  }
@Test public void testMessage() throws JsonException { Message message = Message.create(JsonValue.parseString(MCRAP_MESSAGE), true, false); assertEquals("MESSAGE_ID", message.getMessageId()); assertEquals("MESSAGE_TITLE", message.getTitle()); assertEquals("https: assertEquals("https: assertEquals("https: assertEquals(1443026786000l, message.getSentDateMS()); assertFalse(message.isRead()); assertFalse(message.isDeleted()); assertEquals(1, message.getExtras().size()); assertEquals("some_value", message.getExtras().getString("some_key")); assertEquals("some_value", message.getExtrasMap().get("some_key")); assertNull(message.getExpirationDate()); assertNull(message.getExpirationDateMS()); assertFalse(message.isExpired()); assertEquals(JsonValue.parseString(MCRAP_MESSAGE), message.getRawMessageJson()); }