Added additional API tests

> Covers all documented functions (new event is missing).

I have no idea how to test the "new" event; storing messages does not trigger it.