使用什么代替 AssertJ isEqualToIgnoringGivenFields?

What to use instead of AssertJ isEqualToIgnoringGivenFields?

此方法似乎已弃用。 如果您能告诉我 AssertJ 建议改用什么,我将不胜感激。

javadoc所述:

Use the recursive comparison by calling usingRecursiveComparison() and chain with ignoringFields(String...).

This method is deprecated because it only compares the first level of fields while the recursive comparison traverses all fields recursively (only stopping at java types).