MessageLifecycleEvent extends Event implements Cloneable, Serializable { public void addMleMarker(MleMarker event) { mleMarkers.add(Args.notNull(event, "markerEvent")); } MessageLifecycleEvent(); @Override String getNameSpace(); void addMleMarker(MleMarker event); List<MleMarker> getMleMarkers(); void setMleMarkers(List<MleMarker> l); void setMessageUniqueId(String uniqueId); String getMessageUniqueId(); String getChannelId(); void setChannelId(String s); void setWorkflowId(String s); String getWorkflowId(); @Override String toString(); @Override MessageLifecycleEvent clone();  }
@Test public void testAddMleMarker() throws Exception { MessageLifecycleEvent mle = new MessageLifecycleEvent(); MleMarker marker = new MleMarker(MLEMARKER_NAME, true, 0, new GuidGenerator().create(new Object())); mle.addMleMarker(marker); try { mle.addMleMarker(null); fail(); } catch (IllegalArgumentException expected) { } assertEquals(1, mle.getMleMarkers().size()); assertEquals(marker, mle.getMleMarkers().get(0)); }