ComponentDto componentDto = new ComponentDto().setId(10L);
when(componentDao.getNullableByKey(session, componentKey)).thenReturn(componentDto);
String data = "{duplications}";
MeasureKey measureKey = MeasureKey.of(componentKey, CoreMetrics.DUPLICATIONS_DATA_KEY);
when(measureDao.getNullableByKey(session, measureKey)).thenReturn(
MeasureDto.createFor(measureKey).setTextValue("{duplications}")
);
List<DuplicationsParser.Block> blocks = newArrayList(new DuplicationsParser.Block(newArrayList(new DuplicationsParser.Duplication(componentDto, 1, 2))));