@Test public void testSerialize() { final Event event = buildEvent(); final EventSerializer serializer = new DefaultEventSerializer(); final String xml = serializer.serialize(event); System.out.println(xml); final String expectedXML = "<Event xmlns=\"event-logging:3\">\n" + " <EventDetail>\n" + " <Create>\n" + " <Outcome>\n" + " <Description>This is my desc with a \"quoted\"text</Description>\n" + " <Data Name=\"MyName\" Value=\"This is my attr with a &#34;quoted&#34;text\"/>\n" + " </Outcome>\n" + " </Create>\n" + " </EventDetail>\n" + "</Event>"; assertThat(xml).isEqualTo(expectedXML); }
@Override public String serialize(final Event event) { return getXML(event); }
DefaultEventSerializer implements EventSerializer { @Override public String serialize(final Event event) { return getXML(event); } }
DefaultEventSerializer implements EventSerializer { @Override public String serialize(final Event event) { return getXML(event); }  }
DefaultEventSerializer implements EventSerializer { @Override public String serialize(final Event event) { return getXML(event); }  @Override String serialize(final Event event); static String getXML(final Event event); }
DefaultEventSerializer implements EventSerializer { @Override public String serialize(final Event event) { return getXML(event); }  @Override String serialize(final Event event); static String getXML(final Event event);  }