private void verifyException(Throwable throwable, String expected, String failMessage) {
        Throwable t = throwable;
        boolean ok = false;
        while (t != null) {
            if (t.getMessage() != null && t.getMessage().contains(expected)) {
                ok = true;
                break;
            }
            t = t.getCause();
        }
        if (!ok) {
            throwable.printStackTrace();
            fail(failMessage);
        }
    }
Verifies that an exception is thrown when one attempts to set an
illegal config value for parameters that have default values.
config/src/test/java/com/yahoo/config/subscription/ConfigInstanceTest.java