public PlainAccessData updateAclConfigFileVersion(String aclFileName, PlainAccessData updateAclConfigMap) {

        List<PlainAccessData.DataVersion> dataVersions = updateAclConfigMap.getDataVersion();
        DataVersion dataVersion = new DataVersion();
        if (dataVersions != null && !dataVersions.isEmpty()) {
            dataVersion.setTimestamp(dataVersions.get(0).getTimestamp());
            dataVersion.setCounter(new AtomicLong(dataVersions.get(0).getCounter()));
        }
        dataVersion.nextVersion();
        List<PlainAccessData.DataVersion> versionElement = new ArrayList<>();
        PlainAccessData.DataVersion dataVersionNew = new PlainAccessData.DataVersion();
        dataVersionNew.setTimestamp(dataVersion.getTimestamp());
        dataVersionNew.setCounter(dataVersion.getCounter().get());
        versionElement.add(dataVersionNew);
        updateAclConfigMap.setDataVersion(versionElement);

        dataVersionMap.put(aclFileName, dataVersion);

        return updateAclConfigMap;
    }
@Test
    public void updateAclConfigFileVersionTest() {
        String aclFileName = "test_plain_acl";
        PlainAccessData updateAclConfigMap = new PlainAccessData();
        List<PlainAccessData.DataVersion> versionElement = new ArrayList<>();
        PlainAccessData.DataVersion accountsMap = new PlainAccessData.DataVersion();
        accountsMap.setCounter(1);
        accountsMap.setTimestamp(System.currentTimeMillis());
        versionElement.add(accountsMap);

        updateAclConfigMap.setDataVersion(versionElement);
        final PlainAccessData map = plainPermissionManager.updateAclConfigFileVersion(aclFileName, updateAclConfigMap);
        final List<PlainAccessData.DataVersion> version = map.getDataVersion();
        Assert.assertEquals(2L, version.get(0).getCounter());
    }