Added exceptions tests and fixed api map imported on api object