fix RemoteResourceServerException use, add some more tests