refactor test fixtures as json

This makes it simple to reuse from QUnit, to test client-side
allocation calculation.

Change-Id: Icddf07c85b74bb18d201a4572b91281d1e98fd28
Merge "refactor test fixtures as json"