@Override
  public DefaultSignificantCode addRange(TextRange range) {
    Preconditions.checkState(this.inputFile != null, "addRange() should be called after on()");

    int line = range.start().line();

    Preconditions.checkArgument(line == range.end().line(), "Ranges of significant code must be located in a single line");
    Preconditions.checkState(!significantCodePerLine.containsKey(line), "Significant code was already reported for line '%s'. Can only report once per line.", line);

    significantCodePerLine.put(line, range);
    return this;
  }
@Test
  public void fail_if_add_range_before_setting_file() {
    assertThatThrownBy(() -> underTest.addRange(inputFile.selectLine(1)))
      .isInstanceOf(IllegalStateException.class)
      .hasMessage("addRange() should be called after on()");
  }