CB-6481 Add tests for plugin hooks