Add api tests and examples.