Extract PolyInterpolator.main into Junit test case.