@CanIgnoreReturnValue
  public Replacements add(Replacement replacement) {
    return add(replacement, CoalescePolicy.REJECT);
  }
@Test
  public void overlap() {
    Replacements replacements = new Replacements();
    Replacement hello = Replacement.create(2, 4, "hello");
    Replacement goodbye = Replacement.create(3, 5, "goodbye");
    replacements.add(hello);
    try {
      replacements.add(goodbye);
      fail();
    } catch (IllegalArgumentException expected) {
      assertThat(expected)
          .hasMessageThat()
          .isEqualTo(String.format("%s overlaps with existing replacements: %s", goodbye, hello));
    }
  }