@Override
    public void ensureValid(String name, Object value) {
        if (value == null || ((List) value).isEmpty()) {
            throw new ConfigException(name, value, "Empty list");
        }
    }
@Test
    public void testValidList() {
        new NonEmptyListValidator().ensureValid("foo", Collections.singletonList("foo"));
    }