StartElementProcessor implements XmlEventProcessor { @Override public ImmutableList<XMLEvent> process(String id, XMLEvent event) { return ImmutableList.of(removeNonSvgAttributes(event.asStartElement())); }  @Override boolean accepts(XMLEvent event); @Override ImmutableList<XMLEvent> process(String id, XMLEvent event);  }
@Test public void testProcess() { test.given(eventIsStartElement("path")) .given(startElementHasAttributes()) .when(process()) .then(nonSvgAttributesRemoved()) .then(svgAttributesRemain()); }