adding a unit test and fixing a small typo in the docs.