@Test
void cast() {

    assertThrows(NullPointerException.class, () -> LongUtil.cast(1L ,null));
    assertNull(LongUtil.cast(null, Long.class));
    assertNotNull(LongUtil.cast(1L, Long.class));
    assertCast(Byte.MIN_VALUE, Byte.MAX_VALUE, Byte.class);
    assertCast(Short.MIN_VALUE, Short.MAX_VALUE, Short.class);
    assertCast(Integer.MIN_VALUE, Integer.MAX_VALUE, Integer.class);
    assertCast((long) Float.MIN_VALUE, (long) Float.MAX_VALUE, Float.class, false);
    assertCast((long) Double.MIN_VALUE, (long) Double.MAX_VALUE, Double.class, false);
    assertCast(Long.MIN_VALUE, Long.MAX_VALUE, BigInteger.class, false);
    assertCast(Long.MIN_VALUE, Long.MAX_VALUE, BigDecimal.class, false);
    assertCast(Integer.MIN_VALUE, Integer.MAX_VALUE, AtomicInteger.class);
    assertCast(Long.MIN_VALUE, Long.MAX_VALUE, AtomicLong.class, false);
    assertCast(1L, LongAdder.class, true);
}