@Override public void describeTo(Description description) { description.appendText("a Complex number having "); reMatcher.describeTo(description); description.appendText(" as real part and "); imMatcher.describeTo(description); description.appendText(" as imaginary part"); }
@Override public boolean matchesSafely(Complex complex) { return reMatcher.matches(complex.re) && imMatcher.matches(complex.im); }