@Test public void testConvertMessage() { org.faktorips.runtime.Message ipsMessage = new org.faktorips.runtime.Message.Builder("the text", org.faktorips.runtime.Severity.ERROR) .markers(new TestMarker()) .invalidObject(new org.faktorips.runtime.ObjectProperty("TheObject", "theProperty")) .replacements(new org.faktorips.runtime.MsgReplacementParameter("param1", "theValue")) .code("IPS-0001") .create(); Message message = MessageConverter.convert(ipsMessage); assertThat(message.getText(), is("the text")); assertThat(message.getSeverity(), is(Severity.ERROR)); assertThat(message.getMarkers(), Matchers.hasSize(1)); ValidationMarker marker = message.getMarkers().iterator().next(); assertThat(marker, is(instanceOf(ValidationMarkerWrapper.class))); assertThat(marker, is(instanceOf(ValidationMarkerWrapper.class))); assertThat(((ValidationMarkerWrapper)marker).getWrapped(), is(instanceOf(TestMarker.class))); assertThat(message.getInvalidObjectProperties(), Matchers.hasSize(1)); assertThat(message.getText(), is("the text")); }
public static MessageList convert(org.faktorips.runtime.MessageList ipsMessages) { if (ipsMessages == null) { return new MessageList(); } return StreamUtil.stream(ipsMessages) .map(MessageConverter::convert) .collect(toMessageList()); }
MessageConverter { public static MessageList convert(org.faktorips.runtime.MessageList ipsMessages) { if (ipsMessages == null) { return new MessageList(); } return StreamUtil.stream(ipsMessages) .map(MessageConverter::convert) .collect(toMessageList()); } }
MessageConverter { public static MessageList convert(org.faktorips.runtime.MessageList ipsMessages) { if (ipsMessages == null) { return new MessageList(); } return StreamUtil.stream(ipsMessages) .map(MessageConverter::convert) .collect(toMessageList()); } private  MessageConverter(); }
MessageConverter { public static MessageList convert(org.faktorips.runtime.MessageList ipsMessages) { if (ipsMessages == null) { return new MessageList(); } return StreamUtil.stream(ipsMessages) .map(MessageConverter::convert) .collect(toMessageList()); } private  MessageConverter(); static MessageList convert(org.faktorips.runtime.MessageList ipsMessages); static Message convert(org.faktorips.runtime.Message ipsMessage); }
MessageConverter { public static MessageList convert(org.faktorips.runtime.MessageList ipsMessages) { if (ipsMessages == null) { return new MessageList(); } return StreamUtil.stream(ipsMessages) .map(MessageConverter::convert) .collect(toMessageList()); } private  MessageConverter(); static MessageList convert(org.faktorips.runtime.MessageList ipsMessages); static Message convert(org.faktorips.runtime.Message ipsMessage);  }