- // The hard must not be asserted, because not all implementations ar aware of it
- // .jsonPath("$.shard").isEqualTo(Integer.valueOf(2))
+ .jsonPath("$.shard").value(new BaseMatcher<Integer>() {
+ @Override
+ public boolean matches(Object actual)
+ {
+ return actual == null
+ ? true
+ : actual.equals(Integer.valueOf(2));
+ }
+
+ @Override
+ public void describeTo(Description description)
+ {
+ description.appendText("shard has expected value 2, or is empty");
+ }
+ })