[#8] refactor extension api model and tests.