Rewrote RepoApi tests

Implemented mocking/spying using SinonJS. No actual API request are triggered anymore.

Change-Id: I3d1d3af84cf8924115ef38ef319ae09b51bd0ddf
getEntitiesByPage: Always submit "normalize" parameter if specified

Change-Id: I316f1b6f2aa30510c0ac84e85c25ba28144ed49f