(Issue #12) Add tests

Pull request for merge.