yes, I think so. When you invoke the stop() in the CacheManager, that node will send a message to notify the leaving. After this message, a state transfer may be trigger to avoid losing any data own by the leaving node. At this moment, the RpcManager.getMembers() already knows about the leaving node and returns the most updated cluster members.
Later, the leaving node disconnects from JGroups and the view change is triggered.