Added tests to API (WIP)