Fidelity Investments interview question

Write Junit for invert method in Java.