test_class.declarator: username = uniquify("username")
test_class.modifier: private final
test_class.original_string: private final String username = uniquify("username");
test_class.type: String
test_class.var_name: username
test_class.declarator: password = uniquify("password")
test_class.modifier: private final
test_class.original_string: private final String password = uniquify("password");
test_class.type: String
test_class.var_name: password
test_class.declarator: user = new User(username)
test_class.modifier: private final
test_class.original_string: private final User user = new User(username);
test_class.type: User
test_class.var_name: user
test_class.declarator: tokenStore = mock(TokenStore.class)
test_class.modifier: private final
test_class.original_string: private final TokenStore tokenStore = mock(TokenStore.class);
test_class.type: TokenStore
test_class.var_name: tokenStore
test_class.declarator: userRepository = mock(UserRepository.class)
test_class.modifier: private final
test_class.original_string: private final UserRepository userRepository = mock(UserRepository.class);
test_class.type: UserRepository
test_class.var_name: userRepository
test_class.declarator: authenticationService = new AuthenticationServiceImpl(
        tokenStore, userRepository)
test_class.modifier: private final
test_class.original_string: private final AuthenticationService authenticationService = new AuthenticationServiceImpl(
        tokenStore, userRepository);
test_class.type: AuthenticationService
test_class.var_name: authenticationService
test_class.declarator: token = uniquify("token")
test_class.modifier: private
test_class.original_string: private String token = uniquify("token");
test_class.type: String
test_class.var_name: token
test_class.file: doorman/src/test/java/io/servicecomb/company/auth/AuthenticationServiceImplTest.java
test_class.identifier: AuthenticationServiceImplTest
test_case.body: @Test
    public void validatesUserToken() {
      when(tokenStore.parse(token)).thenReturn(username);
  
      String user = authenticationService.validate(token);
  
      assertThat(user).isEqualTo(username);
    }
test_case.class_method_signature: AuthenticationServiceImplTest.validatesUserToken()
test_case.full_signature: @Test public void validatesUserToken()
test_case.identifier: validatesUserToken
test_case.invocations: thenReturn when parse validate isEqualTo assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void validatesUserToken()
focal_class.declarator: tokenStore
focal_class.modifier: private final
focal_class.original_string: private final TokenStore tokenStore;
focal_class.type: TokenStore
focal_class.var_name: tokenStore
focal_class.declarator: userRepository
focal_class.modifier: private final
focal_class.original_string: private final UserRepository userRepository;
focal_class.type: UserRepository
focal_class.var_name: userRepository
focal_class.file: doorman/src/main/java/io/servicecomb/company/auth/AuthenticationServiceImpl.java
focal_class.identifier: AuthenticationServiceImpl
focal_class.interfaces: implements AuthenticationService
focal_class.class_method_signature: AuthenticationServiceImpl.AuthenticationServiceImpl(
        TokenStore tokenStore,
        UserRepository userRepository)
focal_class.full_signature:   AuthenticationServiceImpl(
        TokenStore tokenStore,
        UserRepository userRepository)
focal_class.identifier: AuthenticationServiceImpl
focal_class.parameters: (
        TokenStore tokenStore,
        UserRepository userRepository)
focal_class.signature:  AuthenticationServiceImpl(
        TokenStore tokenStore,
        UserRepository userRepository)
focal_class.class_method_signature: AuthenticationServiceImpl.authenticate(String username, String password)
focal_class.full_signature: @Override public String authenticate(String username, String password)
focal_class.identifier: authenticate
focal_class.modifiers: @Override public
focal_class.parameters: (String username, String password)
focal_class.return: String
focal_class.signature: String authenticate(String username, String password)
focal_class.class_method_signature: AuthenticationServiceImpl.validate(String token)
focal_class.full_signature: @Override public String validate(String token)
focal_class.identifier: validate
focal_class.modifiers: @Override public
focal_class.parameters: (String token)
focal_class.return: String
focal_class.signature: String validate(String token)
focal_method.body: @Override
    public String validate(String token) {
      try {
        return tokenStore.parse(token);
      } catch (TokenException e) {
        throw new UnauthorizedAccessException("No user matches such a token " + token, e);
      }
    }
focal_method.class_method_signature: AuthenticationServiceImpl.validate(String token)
focal_method.full_signature: @Override public String validate(String token)
focal_method.identifier: validate
focal_method.invocations: parse
focal_method.modifiers: @Override public
focal_method.parameters: (String token)
focal_method.return: String
focal_method.signature: String validate(String token)