RedisConfig extends Config { @Override protected void validate() { if (host == null) throw new Error("redis host must be configured, name=" + name); }  void host(String host); void poolSize(int minSize, int maxSize); void slowOperationThreshold(Duration threshold); void timeout(Duration timeout); Redis client();  }
@Test void validate() { assertThatThrownBy(() -> config.validate()) .hasMessageContaining("redis host must be configured"); }