Fix a NPE exposed in the tests and also reduce the class visibility of a couple of classes that were introduced in the previous commit (RemotingConnectionManager and RemotingEndpointManager)