X-Git-Url: https://gerrit.onap.org/r/gitweb?p=holmes%2Frule-management.git;a=blobdiff_plain;f=rulemgt%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fholmes%2Frulemgt%2Fdb%2FCorrelationRuleQueryDaoTest.java;h=0e97e3a69b333f1b9cb6b6a7b3d14261820aecc0;hp=e028a2c60c39de83ca8d0358dd12710e34fa7f5c;hb=abdc7bfcaf9431fd507f0e9cd7fbdb96413386cd;hpb=18a28b93a3c41df917865ee897bd0f51bed760d6 diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java index e028a2c..0e97e3a 100644 --- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java +++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/db/CorrelationRuleQueryDaoTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2017 ZTE Corporation. + * Copyright 2017-2020 ZTE Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,38 +16,35 @@ package org.onap.holmes.rulemgt.db; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; - -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Properties; import org.easymock.EasyMock; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; +import org.junit.runner.RunWith; import org.onap.holmes.common.api.entity.CorrelationRule; import org.onap.holmes.common.exception.CorrelationException; import org.onap.holmes.common.utils.DbDaoUtil; import org.onap.holmes.rulemgt.bean.request.RuleQueryCondition; import org.powermock.api.easymock.PowerMock; -import org.powermock.modules.junit4.rule.PowerMockRule; +import org.powermock.core.classloader.annotations.PrepareForTest; +import org.powermock.modules.junit4.PowerMockRunner; import org.powermock.reflect.Whitebox; import org.skife.jdbi.v2.Handle; import org.skife.jdbi.v2.Query; +import java.util.*; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.is; + +@RunWith(PowerMockRunner.class) +@PrepareForTest({DbDaoUtil.class, Handle.class, Query.class}) public class CorrelationRuleQueryDaoTest { @Rule public ExpectedException thrown = ExpectedException.none(); - @Rule - public PowerMockRule powerMockRule = new PowerMockRule(); private DbDaoUtil dbDaoUtil; private Handle handle;