Added debug code to unit tests