Fixed API tests to reach 100% code coverage