DEV: add debug code to unit tests