public static String substitute(
      final String string,
      final Map<String, String> valueMap
  ) {
    return StringSubstitutor.replace(
        string, valueMap.entrySet().stream()
            .collect(Collectors.toMap(e -> e.getKey(), e -> sanitize(e.getValue())))
    );
  }
@Test
  public void shouldSubstituteVariablesInAssert() {
    // Given
    final Map<String, String> variablesMap = new ImmutableMap.Builder<String, String>() {{
      put("name", "foo");
    }}.build();

    // When
    final String substitutedString = VariableSubstitutor.substitute("ASSERT TOPIC '${name}';", variablesMap);
    final String substitutedIdentifier = VariableSubstitutor.substitute("ASSERT TOPIC ${name};", variablesMap);

    // Then
    assertThat(substitutedString, equalTo("ASSERT TOPIC 'foo';"));
    assertThat(substitutedIdentifier, equalTo("ASSERT TOPIC foo;"));
  }