@Override
  public Set<String> validSiteKeys(final Action action) {
    final DynamicCaptchaConfiguration config = dynamicConfigurationManager.getConfiguration().getCaptchaConfiguration();
    if (!config.isAllowHCaptcha()) {
      logger.warn("Received request to verify an hCaptcha, but hCaptcha is not enabled");
      return Collections.emptySet();
    }
    return Optional
        .ofNullable(config.getHCaptchaSiteKeys().get(action))
        .orElse(Collections.emptySet());
  }
@Test
  public void badSiteKey() throws IOException {
    final HCaptchaClient hc = new HCaptchaClient("fake", null, mockConfig(true, 0.5));
    for (Action action : Action.values()) {
      assertThat(hc.validSiteKeys(action)).contains(SITE_KEY);
      assertThat(hc.validSiteKeys(action)).doesNotContain("invalid");
    }
  }