MatcherPositionIterator implements PositionIterator { @Override public boolean hasNext( PayloadPosition payloadPosition ) { Iterator<Finding> iterator = findingsIteratorMap.get( payloadPosition ); if ( iterator != null ) { return iterator.hasNext(); } else { return false; } } MatcherPositionIterator( String xmlWithPlaceholder ); @Override boolean hasNext( PayloadPosition payloadPosition ); @Override Position next( PayloadPosition payloadPosition ); @Override void reset();  }
@Test public void none() { String xmlWithPlaceholder = "<soapenv:Envelope>" + " <soapenv:Header />" + " <soapenv:Body >" + " <cxf:celsiusToFarenheit>" + " <arg0>1</arg0>" + " </cxf:celsiusToFarenheit>" + " </soapenv:Body>" + "</soapenv:Envelope>"; MatcherPositionIterator iterator = new MatcherPositionIterator( xmlWithPlaceholder ); assertThat( iterator.hasNext( PayloadPosition.ELEMENT ), is( Boolean.FALSE ) ); assertThat( iterator.hasNext( PayloadPosition.ATTRIBUTE ), is( Boolean.FALSE ) ); }