ComplexBuilder implements IBuilder<Complex> { @Override public Complex build() { return Complex.cart(re, im); } ComplexBuilder(final Complex c);  ComplexBuilder(final double re);  ComplexBuilder(final double re, final double im); double getRe(); double getIm(); ComplexBuilder add(final Complex c); ComplexBuilder add(final double a); ComplexBuilder chs(); ComplexBuilder div(final Complex c); ComplexBuilder div(final double r); ComplexBuilder inv(); ComplexBuilder mul(final Complex c); ComplexBuilder mul(final double r); ComplexBuilder mul(final double x, final double y); ComplexBuilder sub(final Complex c); ComplexBuilder sub(final double r); @Override Complex build();  }
@Test public void testConstructorComplex() { assertEquals(c1, new ComplexBuilder(c1).build()); }
@Test public void testConstructorDouble() { assertEquals(c3, new ComplexBuilder(3.14).build()); }
@Test public void testConstructorDouble2() { assertEquals(c1, new ComplexBuilder(54.654, 7.321).build()); }