Add base api for events and tests