Hamilton and Rosberg pass Mercedes teammate test