Adding test coverage for the pulling subscriber

This commit also contains a  slight refactor of the pulling subscriber