@Test
public void testDanger() {

    ResultMessage msg1 = ResultMessage.fromCode("foo", "aa");
    ResultMessage msg2 = ResultMessage.fromCode("bar", "bb");
    ResultMessages messages = ResultMessages.danger().add("foo", "aa").add(
            "bar", "bb");
    assertThat(messages.getType(), is((ResultMessageType) DANGER));
    assertThat(messages.getList(), is(Arrays.asList(msg1, msg2)));
}