First argument to each assertFoo
method can be a string that's printed if the assertion fails:
public void testAdd() {
Complex z1 = new Complex(1, 1);
Complex z2 = new Complex(1, 1);
Complex z3 = z1.add(z2);
assertEquals("Addition failed in real part", 2, z3.getRealPart());
assertEquals("Addition failed in imaginary part", 2, z3.getImaginaryPart());
}