You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When two java.util.Map objects are compared with isEqualToComparingFieldByFieldRecursively, and one of the keys has a different value, the error message is not showing which key has the wrong value. It displays Path to difference: <>.
java.lang.AssertionError:
Expecting:
<{"k1"="v1"}>
to be equal to:
<{"k1"="different"}>
when recursively comparing field by field, but found the following difference(s):
Path to difference: <>
- actual : <"v1">
- expected: <"different">
The text was updated successfully, but these errors were encountered:
Summary
When two
java.util.Map
objects are compared withisEqualToComparingFieldByFieldRecursively
, and one of the keys has a different value, the error message is not showing which key has the wrong value. It displaysPath to difference: <>
.Example
Resulting message:
The text was updated successfully, but these errors were encountered: