@Test public void checkNull() { expectedException.expect(IllegalArgumentException.class); expectedException.expectMessage("param is null"); Utils.checkNotNull(null, "param is null"); }
@NonNull static <T> T checkNotNull(@Nullable final T reference, final String message) { if (reference == null) { throw new IllegalArgumentException(message); } return reference; }
Utils { @NonNull static <T> T checkNotNull(@Nullable final T reference, final String message) { if (reference == null) { throw new IllegalArgumentException(message); } return reference; } }
Utils { @NonNull static <T> T checkNotNull(@Nullable final T reference, final String message) { if (reference == null) { throw new IllegalArgumentException(message); } return reference; } private  Utils(); }
Utils { @NonNull static <T> T checkNotNull(@Nullable final T reference, final String message) { if (reference == null) { throw new IllegalArgumentException(message); } return reference; } private  Utils();  }
Utils { @NonNull static <T> T checkNotNull(@Nullable final T reference, final String message) { if (reference == null) { throw new IllegalArgumentException(message); } return reference; } private  Utils();   }