Next test:
public void testAddNonEqualNumbers() {
Complex z1 = new Complex(1, 1);
Complex z2 = new Complex(2, 2);
Complex z3 = z1.add(z2);
assertEquals(3, z3.getRealPart(), 0);
assertEquals(3, z3.getImaginaryPart(), 0);
}
This test fails!
So fix the code