Unittests for the API