Add unit tests
Merge pull request #1 from bmac/add-tests

Add unit tests