+ /**
+ * Validates the state of this post reply builder.
+ *
+ * @throws IllegalStateException
+ * if the state is not valid for building a new post reply
+ */
+ protected void validate() throws IllegalStateException {
+ checkState(senderId != null, "sender must not be null");
+ checkState(!StringUtils.isBlank(text), "text must not be empty");
+ }
+