anchor.diff:      DATA: lv_auth TYPE string.
   
   
  -    lv_auth =  ii_client->request->get_header_field( 'authorization' ). "#EC NOTEXT
  +    lv_auth = ii_client->request->get_header_field( 'authorization' ). "#EC NOTEXT
   
       IF NOT lv_auth IS INITIAL.
  -      append( iv_uri = iv_uri
  +      append( iv_uri  = iv_uri
                 iv_auth = lv_auth ).
       ENDIF.
   
  
positive.code:     READ TABLE gt_auth WITH KEY uri = iv_uri TRANSPORTING NO FIELDS.
      IF sy-subrc <> 0.
        APPEND INITIAL LINE TO gt_auth ASSIGNING <ls_auth>.
        <ls_auth>-uri           = iv_uri.
        <ls_auth>-authorization = iv_auth.
      ENDIF.
  
  
negative.code:     CLASS-METHODS:
        append
          IMPORTING iv_uri  TYPE string
                    iv_auth TYPE string
          RAISING   lcx_exception.
  
  ENDCLASS.
  
  CLASS ltcl_login_manager DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
  
    PRIVATE SECTION.
      CONSTANTS: c_username TYPE string VALUE 'Aladdin',
                 c_password TYPE string VALUE 'OpenSesame'.
  
      METHODS:
        setup,
        teardown,
        encoding FOR TESTING
          RAISING lcx_exception,
        same_server FOR TESTING
          RAISING lcx_exception.
  
  ENDCLASS.
  
  CLASS ltcl_login_manager IMPLEMENTATION.
  
    METHOD setup.
      lcl_login_manager=>clear( ).
    ENDMETHOD.
  
    METHOD teardown.
      lcl_login_manager=>clear( ).
    ENDMETHOD.
  
    METHOD encoding.
  
      DATA: lv_auth TYPE string.
  
      lv_auth = lcl_login_manager=>set(
        iv_uri      = 'https://github.com/larshp/abapGit.git'
        iv_username = c_username
        iv_password = c_password ).
  
      cl_abap_unit_assert=>assert_equals(
        act = lv_auth
        exp = 'Basic QWxhZGRpbjpPcGVuU2VzYW1l' ).
  
    ENDMETHOD.
  
    METHOD same_server.
  
      CONSTANTS: lc_github1 TYPE string VALUE 'https://github.com/larshp/abapGit.git',
                 lc_github2 TYPE string VALUE 'https://github.com/larshp/Foobar.git'.
  
      DATA: lv_auth1 TYPE string,
            lv_auth2 TYPE string.
  
  
      lcl_login_manager=>set(
        iv_uri      = lc_github1
        iv_username = c_username
        iv_password = c_password ).
  
      lv_auth1 = lcl_login_manager=>load( lc_github1 ).
      lv_auth2 = lcl_login_manager=>load( lc_github2 ).
  
      cl_abap_unit_assert=>assert_equals(
        act = lv_auth1
        exp = lv_auth2 ).
  
    ENDMETHOD.
  
  ENDCLASS.
  
  CLASS lcl_login_manager IMPLEMENTATION.
  
    METHOD clear.
      CLEAR gt_auth.
    ENDMETHOD.
  
    METHOD set.
  
  