Added more unit tests

File post, API version selection, HTTP errors