I\'ve got such a code snippet:
@RunWith(PowerMockRunner.class) @PrepareForTest({Thread.class}) public class AllMeasuresDataTest { @Before public void setUp(
Try adding this annotation to your Test class:
@PowerMockIgnore("javax.management.*")
Worked for me.