fix comparison error in log
add check for method call to mock