aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java')
-rw-r--r--services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
index ab20f4b0c..f1a2a089c 100644
--- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
+++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/TestApexStarterConstants.java
@@ -1,6 +1,6 @@
/*-
* ============LICENSE_START=======================================================
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019,2023 Nordix Foundation.
* Modifications Copyright (C) 2020 Nordix Foundation
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,8 +23,8 @@ package org.onap.policy.apex.services.onappf;
import static org.assertj.core.api.Assertions.assertThatCode;
+import java.lang.reflect.Constructor;
import org.junit.Test;
-import org.powermock.reflect.Whitebox;
/**
* Class to perform unit test of {@link ApexStarterConstants}}.
@@ -35,6 +35,10 @@ public class TestApexStarterConstants {
@Test
public void test() throws Exception {
// verify that constructor does not throw an exception
- assertThatCode(() -> Whitebox.invokeConstructor(ApexStarterConstants.class)).doesNotThrowAnyException();
+ assertThatCode(() -> {
+ Constructor<ApexStarterConstants> c = ApexStarterConstants.class.getDeclaredConstructor();
+ c.setAccessible(true);
+ c.newInstance();
+ }).doesNotThrowAnyException();
}
}