Testing an internal state of an object is not a good practice. You should test behaviour instead.