Add tests for the public API