class Validator {

  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 + "'");
  }

}