checkState(!StringUtils.isBlank(text), "text must not be empty");
checkState((recipient == null) || !recipient.equals(sender), "sender and recipient must not be the same");
return new PostImpl(randomId ? UUID.randomUUID().toString() : id, sender, currentTime ? System.currentTimeMillis() : time, text).setRecipient(recipient);
checkState(!StringUtils.isBlank(text), "text must not be empty");
checkState((recipient == null) || !recipient.equals(sender), "sender and recipient must not be the same");
return new PostImpl(randomId ? UUID.randomUUID().toString() : id, sender, currentTime ? System.currentTimeMillis() : time, text).setRecipient(recipient);