Add a few unit tests for new API function.