I have been working on a script in Java to solve cubic equations. I've been following along with Mathematics and Physics for Programmers to teach my self about, well maths and physics.
As far as I can test it is working correctly, but I have not been able to find an equation with a discriminant of zero to test that case.
The equation that the code is based on is as follows:

If the discriminant is > 0:

if the discriminant = 0 (I do not know an equation to test this):

if the discriminant < 0:

After finding t transform it by:

I'd be very grateful if someone can help me work out how to test this is working correctly.
For anyone interested my code is here: https://github.com/sarcoma/Java-Algorithms/blob/master/src/com/oacc/maths/SolveCubic.java