@Test
  void constant() {
    // null
    new EqualsTester()
            .addEqualityGroup(Constant.ofType(null, String.class), Constant.ofType(null, String.class))
            .addEqualityGroup(Constant.ofType(null, Boolean.class))
            .testEquals();

    // string
    new EqualsTester()
            .addEqualityGroup(Constant.of("a"), Constant.of("a"))
            .addEqualityGroup(Constant.of(""))
            .addEqualityGroup(Constant.ofType(null, String.class))
            .testEquals();
    // int
    new EqualsTester()
            .addEqualityGroup(Constant.of(1), Constant.of(1))
            .addEqualityGroup(Constant.of(2))
            .testEquals();

    // boolean
    new EqualsTester()
            .addEqualityGroup(Constant.of(false), Constant.of(false))
            .addEqualityGroup(Constant.of(true))
            .testEquals();
  }
Validate equals / hashCode behaviour for {@link Expression} implementations
criteria/common/test/org/immutables/criteria/expression/ExpressionEqualsHashcodeTest.java