Add tests
Created by: joshuai96
As mentioned in SovereignCloudStack/issues#222 the API server should be tested by unit oder behavior testing.
These test use a mocked SQL connection and fake http requests, to test the API operation handlers, as if they were called by a client.
The mocked SQL connections is used to simulated any kind of data or error returned by the databse and checks Gorms query generation against a expected query.
The fake http requests deliver request bodies to the function.
A request recorder checks for the http response, if any.