* Rearranging plugin mocks and moving some common test code out. * Adding tests. * Fixing tests after GoDoc cleanup changes.