public static List<Permission> getUserApplicationPermissions(Set<org.onosproject.security.Permission> permissions) {
        List<Permission> perms = Lists.newArrayList();
        perms.addAll(defaultPermissions);
        perms.addAll(convertToJavaPermissions(permissions));
        return optimizePermissions(perms);
    }
@Test
    public void testGetUserApplicationPermissions() {
        List<Permission> perms = Lists.newArrayList();
        perms.addAll(defaultPermissions);
        assertEquals(5, defaultPermissions.size());
        perms.addAll(testJavaPerms);
        assertEquals(1, testJavaPerms.size());
        assertEquals(6, perms.size());
        assertTrue(perms.contains(testJavaPerm));
    }