Add missing unit test and update API documentation