@Test
void bigDecimalOrElseThrow() {

    final ToBigDecimalOrThrow<BigDecimal> toBigDecimalOrThrow = OrElseThrowUtil.bigDecimalOrElseThrow(d -> d);
    assertEquals(BigDecimal.valueOf(1), toBigDecimalOrThrow.apply(BigDecimal.valueOf(1)));
    assertThrows(NullPointerException.class, () -> toBigDecimalOrThrow.apply(null));
}