public static Set<org.onosproject.security.Permission> convertToOnosPermissions(List<Permission> permissions) {
        Set<org.onosproject.security.Permission> result = Sets.newHashSet();
        for (Permission perm : permissions) {
            org.onosproject.security.Permission onosPerm = getOnosPermission(perm);
            if (onosPerm != null) {
                result.add(onosPerm);
            }
        }
        return result;
    }
@Test
    public void testConvertToOnosPermissions() {
        Permission testJavaPerm = new AppPermission("testName");

        List<org.onosproject.security.Permission> result = Lists.newArrayList();
        org.onosproject.security.Permission onosPerm =
                new org.onosproject.security.Permission(AppPermission.class.getName(), testJavaPerm.getName(), "");
        result.add(onosPerm);

        assertTrue(!result.isEmpty());
        assertEquals("TESTNAME", result.get(0).getName());
    }