bug 366235: add tests, refactor implementation, and add usage example to interface
5 files changed