Rewrite JUnit tests of PowerMgmt implementation