public static org.onosproject.security.Permission getOnosPermission(Permission permission) {
        if (permission instanceof AppPermission) {
            return new org.onosproject.security.Permission(AppPermission.class.getName(), permission.getName(), "");
        } else if (permission instanceof FilePermission) {
            return new org.onosproject.security.Permission(
                    FilePermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof SerializablePermission) {
            return new org.onosproject.security.Permission(
                    SerializablePermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof NetPermission) {
            return new org.onosproject.security.Permission(
                    NetPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof RuntimePermission) {
            return new org.onosproject.security.Permission(
                    RuntimePermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof SocketPermission) {
            return new org.onosproject.security.Permission(
                    SocketPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof SQLPermission) {
            return new org.onosproject.security.Permission(
                    SQLPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof PropertyPermission) {
            return new org.onosproject.security.Permission(
                    PropertyPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof LoggingPermission) {
            return new org.onosproject.security.Permission(
                    LoggingPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof SSLPermission) {
            return new org.onosproject.security.Permission(
                    SSLPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof AuthPermission) {
            return new org.onosproject.security.Permission(
                    AuthPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof PrivateCredentialPermission) {
            return new org.onosproject.security.Permission(
                    PrivateCredentialPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof DelegationPermission) {
            return new org.onosproject.security.Permission(
                    DelegationPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof javax.security.auth.kerberos.ServicePermission) {
            return new org.onosproject.security.Permission(
                    javax.security.auth.kerberos.ServicePermission.class.getName(), permission.getName(),
                    permission.getActions());
        } else if (permission instanceof AudioPermission) {
            return new org.onosproject.security.Permission(
                    AudioPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof AdaptPermission) {
            return new org.onosproject.security.Permission(
                    AdaptPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof BundlePermission) {
            return new org.onosproject.security.Permission(
                    BundlePermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof CapabilityPermission) {
            return new org.onosproject.security.Permission(
                    CapabilityPermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof PackagePermission) {
            return new org.onosproject.security.Permission(
                    PackagePermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof ServicePermission) {
            return new org.onosproject.security.Permission(
                    ServicePermission.class.getName(), permission.getName(), permission.getActions());
        } else if (permission instanceof AdminPermission) {
            return new org.onosproject.security.Permission(
                    AdminPermission.class.getName(), permission.getName(), permission.getActions());
        //} else if (permission instanceof ConfigurationPermission) {
        //    return new org.onosproject.security.Permission(
        //            ConfigurationPermission.class.getName(), permission.getName(), permission.getActions());
        }
        return null;
    }
@Test
    public void testGetOnosPermission() {
        org.onosproject.security.Permission result = null;
        if (testJavaPerm instanceof AppPermission) {
            result = new org.onosproject.security.Permission(AppPermission.class.getName(), testJavaPerm.getName(), "");
        }
        assertNotNull(result);
        assertEquals("TESTNAME", result.getName());
    }