@CanIgnoreReturnValue
  @Override
  public V put(K key, V value) {
    if (key == null) {
      throw new NullPointerException("key == null");
    }
    if (value == null && !allowNullValues) {
      throw new NullPointerException("value == null");
    }
    Node<K, V> created = find(key, true);
    V result = created.value;
    created.value = value;
    return result;
  }
@Test
  @SuppressWarnings("ModifiedButNotUsed")
  public void testPutNullKeyFails() {
    LinkedTreeMap<String, String> map = new LinkedTreeMap<>();
    var e = assertThrows(NullPointerException.class, () -> map.put(null, "android"));
    assertThat(e).hasMessageThat().isEqualTo("key == null");
  }