Add tests for hosting API