By the way, this approach sure works, but looks a bit weird from documentation point of view:
```
    /**
     * @class CAPI
     * @constructor
     * @param endPointUrl {String} url pointing to REST root
     * @param authenticationAgent {Object} Instance of one of the AuthAgents (e.g. SessionAuthAgent, HttpBasicAuthAgent)
...
     */
    return function (endPointUrl, authenticationAgent) {
...
}


```