test method working for both site and shared credential classes.
allow site to correctly parse the correct credential object.
clean up and formatting with additional method edit to simplify.