[#] refactors extensions api model and adds a new test.

Change-Id: Id6f8fb5bba677c94cb5ab7944f104206bf18e6a2