added some documentation and logging for test clarity.