@Test
void castOrFail() {

    assertThrows(NullPointerException.class, () -> Cast.castOrFail("value", null));
    assertThrows(NoSuchElementException.class, () -> Cast.castOrFail(null, String.class));
    assertThrows(NoSuchElementException.class, () -> Cast.castOrFail(1, String.class));
    assertEquals(1, Cast.castOrFail(1L, Number.class).intValue());
}