Test: fix the tests and remove APi tests

In fact the API is still incomplete and will change a lot in the future.