code: public static Cookie getAuthenticationCookie(String domainUrl) throws TechnicalException {
          if (getInstance().authCookie == null) {
              final String cookieStr = System.getProperty(SESSION_COOKIE);
              try {
                  if (cookieStr != null && !"".equals(cookieStr)) {
                      final int indexValue = cookieStr.indexOf('=');
                      final int indexPath = cookieStr.indexOf(",path=");
                      final String cookieName = cookieStr.substring(0, indexValue);
                      final String cookieValue = cookieStr.substring(indexValue + 1, indexPath);
                      final String cookieDomain = new URI(domainUrl).getHost().replaceAll("self.", "");
                      final String cookiePath = cookieStr.substring(indexPath + 6);
                      getInstance().authCookie = new Cookie.Builder(cookieName, cookieValue).domain(cookieDomain).path(cookiePath).build();
                      logger.debug("New cookie created: {}={} on domain {}{}", cookieName, cookieValue, cookieDomain, cookiePath);
                  }
              } catch (final URISyntaxException e) {
                  throw new TechnicalException(Messages.getMessage(WRONG_URI_SYNTAX), e);
              }
          }
          return getInstance().authCookie;
      }
docs: Returns a Cookie object by retrieving data from -Dcookie maven parameter.
  
  @param domainUrl
  the domain on which the cookie is applied
  @return a Cookie with a name, value, domain and path.
  @throws TechnicalException
  with a message (no screenshot, no exception)