This is one of those constructs, which could be a lot more readable if **Chai.js** with the **Chai as Promised** Plugin is used. However as discussed [here](https://github.com/ezsystems/ez-js-rest-client/pull/20#issuecomment-28388138) and [here](https://github.com/ezsystems/ez-js-rest-client/pull/20#issuecomment-28389974) it might be overkill to switch over to **Chai.js** only for this quite small part of the API to be tested more nicely.