X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-REST%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Frest%2FXACMLRestTest.java;h=9b4cc3ffbac12fa982c008bf227187d0ba1fe5a0;hb=d417cdaf516523c2d3bc998ca246d0cf6a2c55ec;hp=419b14daa63147d0045c5fa95e752df3884e1178;hpb=10f11fafcf434c70cc9c302d2ab4a801601b71f7;p=policy%2Fengine.git diff --git a/ONAP-REST/src/test/java/org/onap/policy/rest/XACMLRestTest.java b/ONAP-REST/src/test/java/org/onap/policy/rest/XACMLRestTest.java index 419b14daa..9b4cc3ffb 100644 --- a/ONAP-REST/src/test/java/org/onap/policy/rest/XACMLRestTest.java +++ b/ONAP-REST/src/test/java/org/onap/policy/rest/XACMLRestTest.java @@ -20,9 +20,13 @@ package org.onap.policy.rest; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.IOException; +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -95,6 +99,13 @@ public class XACMLRestTest extends Mockito{ } catch (Exception e) { fail(); } - + } + + @Test + public void testConstructorIsPrivate() throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException { + Constructor constructor = XACMLRestProperties.class.getDeclaredConstructor(); + assertTrue(Modifier.isPrivate(constructor.getModifiers())); + constructor.setAccessible(true); + constructor.newInstance(); } } \ No newline at end of file