public static void checkEquals(
      @Nullable String value, String propertyName, String expectedValue) {
    Preconditions.checkNotNull(value, "Property '" + propertyName + "' cannot be null");
    Preconditions.checkArgument(
        value.equals(expectedValue),
        "Property '" + propertyName + "' must be '" + expectedValue + "' but is '" + value + "'");
  }
@Test
  public void testCheckEquals_failsNull() {
    try {
      Validator.checkEquals(null, "test", "something");
      Assert.fail();
    } catch (NullPointerException npe) {
      Assert.assertEquals("Property 'test' cannot be null", npe.getMessage());
    }
  }