HsodConfig extends SimpleComponent<HsodConfig> implements ConfigurationComponent<HsodConfig> { @Override public void basicValidate(final String section) throws ConfigException { if(landingPageUrl == null) { throw new ConfigException(section, "Landing page URL must be provided"); } }  @Override void basicValidate(final String section);  }
@Test(expected = ConfigException.class) public void nullLandingPageUrlNotValid() throws ConfigException { HsodConfig.builder() .landingPageUrl(null) .build() .basicValidate("configSection"); }