Basic unit tests for realtime functionality

This pull request creates several (basic) unit tests for the main realtime node components.

The pull request also introduces minor changes to improve stability and generate less alerts.