@Override public E intern(E sample) {
    E canonical = map.get(sample);
    if (canonical != null) {
      return canonical;
    }

    var value = map.putIfAbsent(sample, sample);
    return (value == null) ? sample : value;
  }
@Test(dataProvider = "interners")
  public void intern(Interner<Int> interner) {
    var canonical = new Int(1);
    var other = new Int(1);

    assertThat(interner.intern(canonical)).isSameInstanceAs(canonical);
    assertThat(interner.intern(other)).isSameInstanceAs(canonical);
    checkSize(interner, 1);

    var next = new Int(2);
    assertThat(interner.intern(next)).isSameInstanceAs(next);
    checkSize(interner, 2);
    checkState(interner);
  }