First round of tests for API (very very muc not DRY)