Add tests for JS toJSON methods
Flush out / fix tests for cosmos data caching in ui
Add TODO comment