In general, try not to write tests that reach into private data.  We do it from time to time when there is no reasonable alternative, but we try not to.