@Test
public void testGetMessages() {

    ResultMessage msg1 = ResultMessage.fromCode("foo");
    ResultMessage msg2 = ResultMessage.fromCode("bar");
    ResultMessages messages = new ResultMessages((ResultMessageType) ERROR, msg1, msg2);
    assertThat(messages.getList(), is(Arrays.asList(msg1, msg2)));
}