content: /*
   * Copyright The OpenTelemetry Authors
   * SPDX-License-Identifier: Apache-2.0
   */
  
  package io.opentelemetry.instrumentation.spring.webmvc.boot;
  
  import java.util.Collection;
  import java.util.Collections;
  import org.springframework.security.core.GrantedAuthority;
  import org.springframework.security.core.userdetails.UserDetails;
  
  public class TestUserDetails implements UserDetails {
  
    private static final long serialVersionUID = 6470776949615799570L;
    private final String username;
    private final String password;
  
    TestUserDetails(String username, String password) {
      this.username = username;
      this.password = password;
    }
  
    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
      return Collections.emptySet();
    }
  
    @Override
    public String getPassword() {
      return password;
    }
  
    @Override
    public String getUsername() {
      return username;
    }
  
    @Override
    public boolean isAccountNonExpired() {
      return true;
    }
  
    @Override
    public boolean isAccountNonLocked() {
      return true;
    }
  
    @Override
    public boolean isCredentialsNonExpired() {
      return true;
    }
  
    @Override
    public boolean isEnabled() {
      return true;
    }
  }
  