test: fixed a typo.
refactor: extracted the local variable.
refactor: improved ObjectDisposalAssertion.