Preconditions { public static void checkNonNull(@Nullable Object object) { if (object == null) { throw new RuntimeException("Object must not be null"); } }  static void checkNonNull(@Nullable Object object);  }
@Test(expected = RuntimeException.class) public void checkNonNull_Null_ThrowsException() { Preconditions.checkNonNull(null); }
@Test public void checkNonNull_NonNull_Succeeds() { Preconditions.checkNonNull(new Object()); }