@@ -0,0 +1,1493 @@
+package com.poiji.util;%0A%0Aimport static org.junit.Assert.assertNotNull;%0Aimport static org.junit.Assume.assumeTrue;%0A%0Aimport java.lang.reflect.ReflectPermission;%0A%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Apublic class ReflectUtilTest %7B%0A%0A    @BeforeClass%0A    public static void ensureSecurityManagerPermits() %7B%0A        SecurityManager securityManager = System.getSecurityManager();%0A        boolean permitted = true;%0A        if (securityManager != null) %7B%0A            try %7B%0A                securityManager.checkPermission(new ReflectPermission(%22suppressAccessChecks%22));%0A            %7D catch (SecurityException e) %7B%0A                permitted = false;%0A            %7D%0A        %7D%0A        assumeTrue(permitted);%0A    %7D%0A%0A    @Test%0A    public void newInstanceOfPackageModel() %7B%0A        PackageModel obj = ReflectUtil.newInstanceOf(PackageModel.class);%0A        assertNotNull(obj);%0A    %7D%0A%0A    @Test%0A    public void newInstanceOfPackageModelWithPrivateConstructor() %7B%0A        PackageModelWithPrivateConstructor obj = ReflectUtil.newInstanceOf(PackageModelWithPrivateConstructor.class);%0A        assertNotNull(obj);%0A    %7D%0A%0A    @Test%0A    public void newInstanceOfPrivateModel() %7B%0A        PrivateModel obj = ReflectUtil.newInstanceOf(PrivateModel.class);%0A        assertNotNull(obj);%0A    %7D%0A%0A    static class PackageModel %7B%0A    %7D%0A%0A    static class PackageModelWithPrivateConstructor %7B%0A        private PackageModelWithPrivateConstructor() %7B%0A        %7D%0A    %7D%0A%0A    static private class PrivateModel %7B%0A    %7D%0A%0A%7D%0A

Add unit test for ReflectUtil.newInstanceOf