Enabling unit tests for sockets and rest endpoints