[WIP] Add more unit tests

At least one unit test for each method that belongs to the public API.