public String computeFor(String serverId) {
    String jdbcUrl = config.get(JDBC_URL.getKey()).orElseThrow(() -> new IllegalStateException("Missing JDBC URL"));
    return DigestUtils.sha256Hex(serverId + "|" + jdbcUrlSanitizer.sanitize(jdbcUrl));
  }
@Test
  public void compute_throws_ISE_if_jdbcUrl_property_is_not_set() {
    ServerIdChecksum underTest = new ServerIdChecksum(new MapSettings().asConfig(), null /*doesn't matter*/);

    assertThatThrownBy(() -> underTest.computeFor("foo"))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("Missing JDBC URL");
  }