Increase code coverage in existing modules

Not all the existing modules have a 100% code coverage. This is mostly due to callback functions that aren't executed while running the unit tests.
Or if it's not optional, the JSDoc should be updated.