unit tests and logging