Wrote unit test for off-by-one. More unit tests will accompany related tickets.