public String generateBadge(String label, String value, Color backgroundValueColor) {
    int labelWidth = computeWidth(label);
    int valueWidth = computeWidth(value);

    Map<String, String> values = ImmutableMap.<String, String>builder()
      .put(PARAMETER_TOTAL_WIDTH, valueOf(MARGIN * 4 + ICON_WIDTH + labelWidth + valueWidth))
      .put(PARAMETER_LABEL_WIDTH, valueOf(labelWidth))
      .put(PARAMETER_VALUE_WIDTH, valueOf(valueWidth))
      .put(PARAMETER_LEFT_WIDTH, valueOf(MARGIN * 2 + ICON_WIDTH + labelWidth))
      .put(PARAMETER_LEFT_WIDTH_PLUS_MARGIN, valueOf(MARGIN * 3 + ICON_WIDTH + labelWidth))
      .put(PARAMETER_RIGHT_WIDTH, valueOf(MARGIN * 2 + valueWidth))
      .put(PARAMETER_ICON_WIDTH_PLUS_MARGIN, valueOf(MARGIN + ICON_WIDTH))
      .put(PARAMETER_COLOR, backgroundValueColor.getValue())
      .put(PARAMETER_LABEL, label)
      .put(PARAMETER_VALUE, value)
      .build();
    StringSubstitutor strSubstitutor = new StringSubstitutor(values);
    return strSubstitutor.replace(badgeTemplate);
  }
@Test
  public void generate_badge() {
    initSvgGenerator();

    String result = underTest.generateBadge("label", "10", DEFAULT);

    checkBadge(result, "label", "10", DEFAULT);
  }