public static void checkNullOrNonNullEntries(
      @Nullable Collection<?> values, String propertyName) {
    if (values == null) {
      // pass
      return;
    }
    for (Object value : values) {
      Preconditions.checkNotNull(
          value, "Property '" + propertyName + "' cannot contain null entries");
    }
  }
@Test
  public void testCheckNullOrNonNullEntries_valuesPass() {
    Validator.checkNullOrNonNullEntries(ImmutableList.of(new Object(), new Object()), "test");
    // pass
  }