Test the decorators

This contains the unit tests for the vapi decorators, along with a
fix for one bug discovered while writing them.