Add protected methods to facilitate unit testing for library consumers.