I want to know what could be the better way to use
assertEquals()
between two objects without defining
equals()
method.
I wanted to use the org.apache.commons.lang3.builder.EqualsBuilder : Assert.assertTrue(EqualsBuilder.reflectionEquals(expected,actual));
But i read in the documentation that it is not the best way to compare two objects : COMMONS Doc.
Also I would like to find an open source library that can do that or even better : no library.
Thank you.