public String generateError(String error) {
    Map<String, String> values = ImmutableMap.of(
      PARAMETER_TOTAL_WIDTH, valueOf(MARGIN + computeWidth(error) + MARGIN),
      PARAMETER_LABEL, error);
    StringSubstitutor strSubstitutor = new StringSubstitutor(values);
    return strSubstitutor.replace(errorTemplate);
  }
@Test
  public void fail_when_unknown_character() {
    initSvgGenerator();

    assertThatThrownBy(() -> underTest.generateError("Méssage with accent"))
      .hasMessage("Invalid character 'é'");
  }