While trying to write Fakes for RetrieveSharedPrincipalsAndAccessResponse we’d realize that PrincipalAccess is read only property and the class itself is sealed.
So to unit test it we need to write a wrapper class as suggested here
The wrapper class
The unit test
Change in the Plugin code using Wrapper instead of original class
Hope it helps