public static Map<String, String> getMaskedConnectConfig(final Map<String, String> config) {
    return config.entrySet().stream().collect(Collectors.toMap(Entry::getKey, e -> {
      if (ALLOWED_KEYS.contains(e.getKey())) {
        return e.getValue();
      }
      return MASKED_STRING;
    }));
  }
@Test
  public void shouldMaskConfigMap() {
    // Given
    final ImmutableMap<String, String> config = ImmutableMap.of(
        "connector.class", "someclass",
        "model", "somemode",
        "key", "somekey"
    );

    // When
    final Map<String, String> maskedConfig = QueryMask.getMaskedConnectConfig(config);

    // Then
    final ImmutableMap<String, String> expectedConfig = ImmutableMap.of(
        "connector.class", "someclass",
        "model", "'[string]'",
        "key", "'[string]'"
    );

    assertThat(maskedConfig, is(expectedConfig));
  }