public static int replaceValue(String regex, String replaceBy, boolean caseSensitive, String value, Consumer<? super String> setter) {
        if (StringUtils.isBlank(value)) {
            return 0;
        }
        Object[] result = replaceAllWithRegex(value, regex, replaceBy, caseSensitive);
        int nbReplaced = (Integer) result[1];
        if (nbReplaced <= 0) {
            return 0;
        }
        setter.accept((String) result[0]);
        return nbReplaced;
    }
@Test
    public void testReplaceValueWithNullSetterThatGetsCalled() {
        Assertions.assertThrows(
                NullPointerException.class,
                () -> JOrphanUtils.replaceValue("\\d+", "${port}", true, "80", null));
    }