public static void validateConfig(Object config, Class annotationClass) {
        for (Field field : config.getClass().getDeclaredFields()) {
            Object value = null;
            field.setAccessible(true);
            try {
                value = field.get(config);
            } catch (IllegalAccessException e) {
                throw new RuntimeException(e);
            }
            validateField(field, value, annotationClass);
        }
        validateClass(config, annotationClass);
    }
@Test
    public void testStringList() {
        TestConfig testConfig = createGoodConfig();
        testConfig.stringList = testIntegerList;
        Exception e = expectThrows(IllegalArgumentException.class, () -> ConfigValidation.validateConfig(testConfig));
        assertTrue(e.getMessage().contains("stringList"));
    }