class VirtualGroupService {

    public String getVirtualGroup(VirtualGroupRequest virtualGroupRequest, String right) {
        String virtualGroup;
        String adminGroup = virtualGroupRequest.getAdminGroup();
        if (StringUtils.isEmpty(adminGroup)) {
            virtualGroup = createOrGetVirtualGroup(virtualGroupRequest.getAccountId(), virtualGroupRequest.getEnvironmentCrn(), right);
        } else {
            virtualGroup = adminGroup;
            LOGGER.info("Admingroup [{}] given by the user is used for {} right on {} environment", adminGroup, right, virtualGroupRequest.getEnvironmentCrn());
        }
        return virtualGroup;
    }

}