class Preconditions {

  public static void notNull(Object parameter) {
    if (parameter == null) {
      throw new IllegalArgumentException("parameter cannot be null");
    }
  }

}

class PreconditionsTest {

  @Test
  public void whenNonNullParameterPassed_thenNothingHappens() {

    Preconditions.notNull(new Object());
  }

}