registry: improve test coverage of unit_state
Merge pull request #702 from jonboulle/reg

registry: improve test coverage of unit_state