}
}
- private List<String> getDMaaPData() throws Exception {
- return new JerseyClient()
+ private List<String> getDMaaPData() {
+ return JerseyClient.newInstance()
.path(consumerGroup)
.path(consumer)
.queryParam("timeout", period)
.get(url, List.class);
}
- private List<VesAlarm> extractVesAlarm(List<String> responseEntity) throws IOException {
+ private List<VesAlarm> extractVesAlarm(List<String> responseEntity) {
List<VesAlarm> vesAlarmList = new ArrayList<>();
for (String entity : responseEntity) {
vesAlarmList.add(dMaaPResponseUtil.convertJsonToVesAlarm(entity));
/*
- * Copyright 2017-2020 ZTE Corporation.
+ * Copyright 2017-2021 ZTE Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import static org.junit.Assert.assertThat;
@RunWith(PowerMockRunner.class)
-@PrepareForTest({ServiceLocatorHolder.class, ServiceLocator.class, Subscriber.class})
+@PrepareForTest({ServiceLocatorHolder.class, JerseyClient.class})
@PowerMockIgnore("javax.net.ssl.*")
public class SubscriberTest {
subscriber.setUrl("https://www.onap.org");
subscriber.setConsumerGroup("group");
subscriber.setConsumer("consumer");
- List<VesAlarm> vesAlarms = subscriber.subscribe();
+
+ subscriber.subscribe();
PowerMock.verifyAll();
}
<dependency>
<groupId>org.onap.holmes.common</groupId>
<artifactId>holmes-actions</artifactId>
- <version>1.3.4</version>
+ <version>1.3.5</version>
<exclusions>
<exclusion>
<groupId>io.dropwizard</groupId>