Extend API: getting metadata. Extend tests.