Fixed unused code in DebugSubscriber
Added new tests