[test] Add tests

Fixes #1.