public static <T> T checkNotNull(T reference,
                                   String errorMessageTemplate,
                                   Object... errorMessageArgs) {
    if (reference == null) {
      // If either of these parameters is null, the right thing happens anyway
      throw new NullPointerException(
          format(errorMessageTemplate, errorMessageArgs));
    }
    return reference;
  }
@Test
  void checkNotNullInputZeroNotNull0OutputZero() {
    // Arrange
    final Object reference = 0;
    final String errorMessageTemplate = "   ";
    final Object[] errorMessageArgs = {};
    // Act
    final Object retval = Util.checkNotNull(reference, errorMessageTemplate, errorMessageArgs);
    // Assert result
    assertThat(retval).isEqualTo(0);
  }