junit test - logging
optimize mail session lookup