ResultMessages implements Serializable, Iterable<ResultMessage> { public ResultMessages addAll(ResultMessage... messages) { if (messages != null) { for (ResultMessage message : messages) { add(message); } } else { throw new IllegalArgumentException("messages must not be null"); } return this; } ResultMessages(ResultMessageType type);  ResultMessages(ResultMessageType type, ResultMessage... messages); ResultMessageType getType(); List<ResultMessage> getList(); ResultMessages add(ResultMessage message); ResultMessages add(String code); ResultMessages add(String code, Object... args); ResultMessages addAll(ResultMessage... messages); ResultMessages addAll(Collection<ResultMessage> messages); boolean isNotEmpty(); static ResultMessages success(); static ResultMessages info(); @Deprecated static ResultMessages warn(); static ResultMessages warning(); static ResultMessages error(); static ResultMessages danger(); @Override Iterator<ResultMessage> iterator(); @Override String toString(); static final String DEFAULT_MESSAGES_ATTRIBUTE_NAME; }
@Test(expected = IllegalArgumentException.class) public void testAddAll02_null() { ResultMessages messages = new ResultMessages((ResultMessageType) ERROR); messages.addAll((ResultMessage[]) null); }
@Test(expected = IllegalArgumentException.class) public void testAddAll12_null() { ResultMessages messages = new ResultMessages((ResultMessageType) ERROR); messages.addAll((Collection<ResultMessage>) null); }