Added unit test
Added example to docstring