@Test(expectedExceptions = RegularExpressionEvaluationException.class)
public void testCheckTargetShouldThrowExceptionWhenRegExpCompilationFailed() {

    //GIVEN
    given(patternFactory.createPattern(EX_REG_EXP)).willThrow(new PatternSyntaxException("", "", 0));
    //WHEN
    underTest.checkTarget(EX_REG_EXP, EX_TARGET);
    //THEN exception is thrown
}