@Test
public void analyseSuspectPattern() {

    BugReporter reporter = mock(BugReporter.class);
    ReDosDetector detector = new ReDosDetector(reporter);
    detector.analyseRegexString("((a)+)+");
    verify(reporter).reportBug(bugDefinition().bugType("REDOS").build());
    reset(reporter);
    detector.analyseRegexString("([b-d])(([a]*))+(0-9)");
    verify(reporter).reportBug(bugDefinition().bugType("REDOS").build());
}