Added tests and a buffer length check for volatile

- Checks that there is nothing in the write buffer when sending volatile
  events
- Adds test cases to see that volatile messages work wden should be and should
  not be received in particular situations