Improved code covage (branches) around cm handle state changes

- added test
- removed redundant (unreachable) check in production code

Issue-ID: CPS-475
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Change-Id: Ia39ac7a1473a248710c2a52f65715fb6b6a85fca
2 files changed