A full test script for various inputs and a Java TestNG implementation that tests it.