CoerciveParsing extends AbstractDoSAttack { @Override public DoSAttack minimal() { CoerciveParsing coerciveParsing = new CoerciveParsing(); coerciveParsing.currentNumberOfTags = MIN_NUMBER_OF_TAGS; coerciveParsing.currentTagName = "x"; return coerciveParsing; } CoerciveParsing(); @Override String getName(); @Override PayloadPosition[] getPossiblePossitions(); IterateModel getNumberOfTagsIterator(); void setNumberOfTagsIterator( IterateModel iterateModel ); String[] getTagNames(); void setTagNames( String[] tagNames ); @Override boolean hasFurtherParams(); @Override void nextParam(); @Override List<DoSParam<?>> getCurrentParams(); @Override String getTamperedRequest( String xml, PayloadPosition payloadPosition ); @Override DoSAttack minimal(); @Override DoSAttack middle( DoSAttack aThat ); @Override void initialize(); @Override int compareTo( DoSAttack aThat );  }
@Test public void minimalTest() throws ParserConfigurationException { PayloadPosition payloadPosition = PayloadPosition.ELEMENT; String xml = IDoSTestHelper.createTestString( payloadPosition ); DoSAttack minimal = coerciveParsing.minimal(); String tamperedRequest = minimal.getTamperedRequest( xml, payloadPosition ); assertThat( tamperedRequest, containsString( "><x><x></x></x><" ) ); }