Updated to Java 11
[holmes/rule-management.git] / rulemgt / src / test / java / org / onap / holmes / rulemgt / send / RuleAllocatorTest.java
index 5dc8281..09fcf93 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright 2017 ZTE Corporation.
+ * Copyright 2017-2020 ZTE Corporation.
  * <p>
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -36,7 +36,6 @@ import org.onap.holmes.rulemgt.wrapper.RuleQueryWrapper;
 import org.powermock.api.easymock.PowerMock;
 import org.powermock.core.classloader.annotations.PrepareForTest;
 import org.powermock.modules.junit4.PowerMockRunner;
-import org.powermock.modules.junit4.rule.PowerMockRule;
 
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -46,6 +45,7 @@ import java.util.stream.Collectors;
 
 import static org.onap.holmes.rulemgt.send.RuleAllocator.ENABLE;
 
+@RunWith(PowerMockRunner.class)
 @PrepareForTest({ServiceLocator.class, RuleMgtWrapper.class, RuleQueryWrapper.class, EngineWrapper.class,
         EngineInsQueryTool.class, DbDaoUtil.class, ServiceLocatorHolder.class})
 public class RuleAllocatorTest {
@@ -53,9 +53,6 @@ public class RuleAllocatorTest {
     @Rule
     public ExpectedException thrown = ExpectedException.none();
 
-    @Rule
-    public PowerMockRule rule = new PowerMockRule();
-
     private RuleMgtWrapper ruleMgtWrapperMock;
     private RuleQueryWrapper ruleQueryWrapperMock;
     private EngineWrapper engineWrapperMock;