anchor.diff:  
       CLASS-DATA: gt_auth TYPE TABLE OF ty_auth WITH DEFAULT KEY.
   
  +    CLASS-METHODS:
  +      append
  +        IMPORTING iv_uri  TYPE string
  +                  iv_auth TYPE string.
  +
   ENDCLASS.
   
  +CLASS ltcl_login_manager DEFINITION FOR TESTING RISK LEVEL HARMLESS DURATION SHORT FINAL.
  +
  +  PRIVATE SECTION.
  +    METHODS:
  +      test1 FOR TESTING.
  +
  +ENDCLASS.
  +
  +CLASS ltcl_login_manager IMPLEMENTATION.
  +
  +  METHOD test1.
  +
  +    DATA: lv_auth TYPE string.
  +
  +    lv_auth = lcl_login_manager=>set(
  +      iv_uri      = 'foobar'
  +      iv_username = 'Aladdin'
  +      iv_password = 'OpenSesame' ).
  +
  +    cl_abap_unit_assert=>assert_equals(
  +        act = lv_auth
  +        exp = 'Basic QWxhZGRpbjpPcGVuU2VzYW1l' ).
  +
  +  ENDMETHOD.
  +
  +ENDCLASS.
  +
   CLASS lcl_login_manager IMPLEMENTATION.
  +
  +  METHOD set.
  +
  +    DATA: lv_concat TYPE string.
  +
  +
  +    ASSERT NOT iv_uri IS INITIAL.
  +
  +    IF iv_username IS INITIAL OR iv_password IS INITIAL.
  +      RETURN.
  +    ENDIF.
  +
  +    CONCATENATE iv_username ':' iv_password INTO lv_concat.
  +
  +    rv_auth = cl_http_utility=>if_http_utility~encode_base64( lv_concat ).
  +
  +    CONCATENATE 'Basic' rv_auth INTO rv_auth SEPARATED BY space.
  +
  +    append( iv_uri  = iv_uri
  +            iv_auth = rv_auth ).
  +
  +  ENDMETHOD.
   
     METHOD load.
   
  
positive.code: 
      DATA: lv_auth TYPE string.
  
      FIELD-SYMBOLS: <ls_auth> LIKE LINE OF gt_auth.
  
  
      lv_auth =  ii_client->request->get_header_field( 'authorization' ). "#EC NOTEXT
  
      IF NOT lv_auth IS INITIAL.
        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 = lv_auth.
        ENDIF.
      ENDIF.
  
    ENDMETHOD.
  
negative.code:       lo_stage->add( <ls_file>-file ).
      ENDLOOP.
  
      io_repo->push( is_comment = ls_comment
                     io_stage   = lo_stage ).
  
  