add test for logging and remove some stubbing