@Test
public void testSetDefaultPermissions() throws IOException {

    PermissionInfo info1 = new PermissionInfo("Admin", "test", "get");
    PermissionInfo info2 = new PermissionInfo("Admin", "test2", "get");
    PermissionInfo[] permInfos = new PermissionInfo[] { info1, info2 };
    String[] encodedPermissions = new String[2];
    int i = 0;
    for (PermissionInfo info : permInfos) {
        encodedPermissions[i++] = info.getEncoded();
    }
    mbean.setDefaultPermissions(encodedPermissions);
    Mockito.verify(permAdmin).setDefaultPermissions(permInfos);
}