Using assert to test the code