Port regression doctest to unit test.
Merge pull request #24 from onepercentclub/port-regression-doctest-to-unit-test

Port regression doctest to unit test