Rewrite JUnit tests of PowerMgmt implementation

No match.