public LiveMeasureDto toLiveMeasureDto(Measure measure, Metric metric, Component component) {
    LiveMeasureDto out = new LiveMeasureDto();
    out.setMetricUuid(metric.getUuid());
    out.setComponentUuid(component.getUuid());
    out.setProjectUuid(treeRootHolder.getRoot().getUuid());
    out.setValue(valueAsDouble(measure));
    out.setData(data(measure));
    return out;
  }
@Test
  public void toLiveMeasureDto() {
    treeRootHolder.setRoot(SOME_COMPONENT);

    LiveMeasureDto liveMeasureDto = underTest.toLiveMeasureDto(
      Measure.newMeasureBuilder().create(Measure.Level.OK),
      SOME_LEVEL_METRIC,
      SOME_COMPONENT);

    assertThat(liveMeasureDto.getTextValue()).isEqualTo(Measure.Level.OK.name());
  }