### Question:
VerifyException extends RuntimeException { static <T> @NonNull T throwIfNull(final @Nullable T obj) { if (obj == null) { throw new VerifyException("Unexpected null reference"); } return obj; } VerifyException(final @NonNull String message);   }### Answer:
@Test public void testThrowIfNullSimple() { assertThrows(VerifyException.class, () -> VerifyException.throwIfNull(null)); }
@Test public void testThrowIfNullSame() { final Object obj = new Object(); assertSame(obj, VerifyException.throwIfNull(obj)); }