### Question:
Validator { public static void checkNullOrNonNullEntries( @Nullable Collection<?> values, String propertyName) { if (values == null) { return; } for (Object value : values) { Preconditions.checkNotNull( value, "Property '" + propertyName + "' cannot contain null entries"); } }  static void checkNotNullAndNotEmpty(@Nullable String value, String propertyName); static void checkNullOrNotEmpty(@Nullable String value, String propertyName); static void checkNotNullAndNotEmpty(@Nullable Collection<?> value, String propertyName); static void checkNullOrNonNullNonEmptyEntries(
      @Nullable Collection<String> values, String propertyName); static void checkNullOrNonNullNonEmptyEntries(
      @Nullable Map<String, String> values, String propertyName); static void checkNullOrNonNullEntries(
      @Nullable Collection<?> values, String propertyName); static void checkEquals(
      @Nullable String value, String propertyName, String expectedValue);  }### Answer:
@Test public void testCheckNullOrNonNullEntries_nullPass() { Validator.checkNullOrNonNullEntries(null, "test"); }
@Test public void testCheckNullOrNonNullEntries_emptyPass() { Validator.checkNullOrNonNullEntries(ImmutableList.of(), "test"); }
@Test public void testCheckNullOrNonNullEntries_valuesPass() { Validator.checkNullOrNonNullEntries(ImmutableList.of(new Object(), new Object()), "test"); }
@Test public void testCheckNullOrNonNullEntries_nullFail() { try { Validator.checkNullOrNonNullEntries(Arrays.asList(new Object(), null), "test"); Assert.fail(); } catch (NullPointerException npe) { Assert.assertEquals("Property 'test' cannot contain null entries", npe.getMessage()); } }