### Question:
ComplexNumber extends Number { @Override public float floatValue() { throw new UnsupportedOperationException("Cannot get the floatValue of a ComplexNumber"); } ComplexNumber(double real);  ComplexNumber(double real, double imaginary); double getReal(); double getImaginary(); @Override double doubleValue(); @Override float floatValue(); @Override int intValue(); @Override long longValue(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static final ComplexNumber I; static final ComplexNumber MINUS_I; static final ComplexNumber ZERO; }### Answer:
@Test public void testFloatValue() { assertThatExceptionOfType(UnsupportedOperationException.class) .isThrownBy(() -> Z1.floatValue()); }