assertEquals() is to test the equality of your expected value with the returning value. Whereas assertTrue() is to check for a condition. Having said that, you can also say
If you have a condition like.
String x = "abc";
String y = "abc";
assertEquals(x, y);
You can also change it to
assertTrue(x.equals(y));
It is just another way of asserting what you expect.