@Override
    public boolean updateGlobalWhiteAddrsConfig(List<String> globalWhiteAddrsList) {
        return aclPlugEngine.updateGlobalWhiteAddrsConfig(globalWhiteAddrsList);
    }
@Test
    public void testUpdateSpecifiedAclFileGlobalWhiteAddrsConfig() throws IOException {
        String folder = "update_global_white_addr";
        File home = AclTestHelper.copyResources(folder);
        System.setProperty("rocketmq.home.dir", home.getAbsolutePath());
        System.setProperty("rocketmq.acl.plain.file", "/conf/plain_acl.yml".replace("/", File.separator));

        String targetFileName = Joiner.on(File.separator).join(new String[]{home.getAbsolutePath(), "conf", "plain_acl.yml"});
        PlainAccessData backUpAclConfigMap = AclUtils.getYamlDataObject(targetFileName, PlainAccessData.class);

        String targetFileName1 = Joiner.on(File.separator).join(new String[]{home.getAbsolutePath(), "conf", "acl", "plain_acl.yml"});
        PlainAccessData backUpAclConfigMap1 = AclUtils.getYamlDataObject(targetFileName1, PlainAccessData.class);

        String targetFileName2 = Joiner.on(File.separator).join(new String[]{home.getAbsolutePath(), "conf", "acl", "empty.yml"});
        PlainAccessData backUpAclConfigMap2 = AclUtils.getYamlDataObject(targetFileName2, PlainAccessData.class);

        PlainAccessValidator plainAccessValidator = new PlainAccessValidator();
        List<String> globalWhiteAddrsList1 = new ArrayList<>();
        globalWhiteAddrsList1.add("10.10.154.1");
        List<String> globalWhiteAddrsList2 = new ArrayList<>();
        globalWhiteAddrsList2.add("10.10.154.2");
        List<String> globalWhiteAddrsList3 = new ArrayList<>();
        globalWhiteAddrsList3.add("10.10.154.3");

        //Test parameter p is null
        plainAccessValidator.updateGlobalWhiteAddrsConfig(globalWhiteAddrsList1, null);
        String defaultAclFile = targetFileName;
        PlainAccessData defaultAclFileMap = AclUtils.getYamlDataObject(defaultAclFile, PlainAccessData.class);
        List<String> defaultAclFileGlobalWhiteAddrList = defaultAclFileMap.getGlobalWhiteRemoteAddresses();
        Assert.assertTrue(defaultAclFileGlobalWhiteAddrList.contains("10.10.154.1"));
        //Test parameter p is not null
        plainAccessValidator.updateGlobalWhiteAddrsConfig(globalWhiteAddrsList2, targetFileName1);
        PlainAccessData aclFileMap1 =  AclUtils.getYamlDataObject(targetFileName1, PlainAccessData.class);
        List<String> aclFileGlobalWhiteAddrList1 = aclFileMap1.getGlobalWhiteRemoteAddresses();
        Assert.assertTrue(aclFileGlobalWhiteAddrList1.contains("10.10.154.2"));
        //Test parameter p is not null, but the file does not have globalWhiteRemoteAddresses
        plainAccessValidator.updateGlobalWhiteAddrsConfig(globalWhiteAddrsList3, targetFileName2);
        PlainAccessData aclFileMap2 =  AclUtils.getYamlDataObject(targetFileName2, PlainAccessData.class);
        List<String> aclFileGlobalWhiteAddrList2 = aclFileMap2.getGlobalWhiteRemoteAddresses();
        Assert.assertTrue(aclFileGlobalWhiteAddrList2.contains("10.10.154.3"));

        AclUtils.writeDataObject(targetFileName, backUpAclConfigMap);
        AclUtils.writeDataObject(targetFileName1, backUpAclConfigMap1);
        AclUtils.writeDataObject(targetFileName2, backUpAclConfigMap2);

        AclTestHelper.recursiveDelete(home);
    }