Improves test coverage

Istanbul complains of missing coverage for 3 branches: two are non-existent `else` branches, and require ignore markers. The third is a missing test for undefined sources in `util.extend`. As this code is used extensively, it makes sense to test against real behaviour, so a test spec is added for sending empty messages, which will also help encapsulate a plausible edge-case.