Add unit test to prove the correctness of the implementation (sorta).