Add a test to check that references pass through methods correctly.