E. Cobham Brewer 18101897. Dictionary of Phrase and Fable. 1898.
Guineapig (A).
A midshipman. A guineapig is neither a pig nor a native of Guinea; so a middy is neither a sailor nor an officer.
1
He had a letter from the captain of the Indiaman, offering you a berth on board as guineapig, or midshipman.Captain Marryat: Poor Jack, chap. xxxi.
A special juryman who is paid a guinea a case: also a military officer assigned to some special duty, for which he receives a guinea a day, are sometimes so called.