@Test
void doubleOrElseThrow() {

    final ToDoubleOrThrow<Double> toDoubleOrThrow = OrElseThrowUtil.doubleOrElseThrow(d -> d);
    assertEquals(1, toDoubleOrThrow.applyAsDouble(1d));
    assertThrows(NullPointerException.class, () -> toDoubleOrThrow.applyAsDouble(null));
}