Fixed the logger test exception due to wrong casting