@Override
    public NacosUser authenticate(String username, String rawPassword) throws AccessException {
        if (StringUtils.isBlank(username) || StringUtils.isBlank(rawPassword)) {
            throw new AccessException("user not found!");
        }
        NacosUserDetails nacosUserDetails = (NacosUserDetails) userDetailsService.loadUserByUsername(username);
        if (nacosUserDetails == null || !PasswordEncoderUtil.matches(rawPassword, nacosUserDetails.getPassword())) {
            throw new AccessException("user not found!");
        }
        return new NacosUser(nacosUserDetails.getUsername(), jwtTokenManager.createToken(username));
    }
@Test
    void testAuthenticate7() throws AccessException {
        NacosUser nacosUser = new NacosUser();
        when(jwtTokenManager.parseToken(anyString())).thenReturn(nacosUser);
        
        MockHttpServletRequest mockHttpServletRequest = new MockHttpServletRequest();
        mockHttpServletRequest.addHeader(AuthConstants.AUTHORIZATION_HEADER, AuthConstants.TOKEN_PREFIX + "-token");
        NacosUser authenticate = abstractAuthenticationManager.authenticate(mockHttpServletRequest);
        
        assertEquals(nacosUser, authenticate);
    }