public boolean deleteAccessConfig(String accessKey) {
        if (StringUtils.isEmpty(accessKey)) {
            log.error("Parameter value accessKey is null or empty String,Please check your parameter");
            return false;
        }

        if (accessKeyTable.containsKey(accessKey)) {
            String aclFileName = accessKeyTable.get(accessKey);
            PlainAccessData aclAccessConfigData = AclUtils.getYamlDataObject(aclFileName,
                PlainAccessData.class);
            if (aclAccessConfigData == null) {
                log.warn("No data found in {} when deleting access config of {}", aclFileName, accessKey);
                return true;
            }
            List<PlainAccessConfig> accounts = aclAccessConfigData.getAccounts();
            Iterator<PlainAccessConfig> itemIterator = accounts.iterator();
            while (itemIterator.hasNext()) {
                if (itemIterator.next().getAccessKey().equals(accessKey)) {
                    // Delete the related acl config element
                    itemIterator.remove();
                    accessKeyTable.remove(accessKey);
                    aclAccessConfigData.setAccounts(accounts);
                    return AclUtils.writeDataObject(aclFileName, updateAclConfigFileVersion(aclFileName, aclAccessConfigData));
                }
            }
        }
        return false;
    }
@Test
    public void deleteAccessConfigTest() throws InterruptedException {
        // delete not exist accessConfig
        final boolean flag1 = plainPermissionManager.deleteAccessConfig("test_delete");
        assert !flag1;

        plainAccessConfig.setAccessKey("test_delete");
        plainAccessConfig.setSecretKey("12345678");
        plainAccessConfig.setWhiteRemoteAddress("192.168.1.1");
        plainAccessConfig.setAdmin(false);
        plainAccessConfig.setDefaultGroupPerm(AclConstants.SUB_PUB);
        plainAccessConfig.setTopicPerms(Arrays.asList(DEFAULT_TOPIC + "=" + AclConstants.PUB));
        plainAccessConfig.setGroupPerms(Lists.newArrayList("groupA=SUB"));
        plainPermissionManager.updateAccessConfig(plainAccessConfig);

        //delete existed accessConfig
        final boolean flag2 = plainPermissionManager.deleteAccessConfig("test_delete");
        assert flag2;

    }