test_class.declarator: wireMockRule = new WireMockRule(wireMockConfig().dynamicPort())
test_class.modifier: @ClassRule
    public static final
test_class.original_string: @ClassRule
    public static final WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort());
test_class.type: WireMockRule
test_class.var_name: wireMockRule
test_class.declarator: username = Randomness.uniquify("username")
test_class.modifier: private final
test_class.original_string: private final String username = Randomness.uniquify("username");
test_class.type: String
test_class.var_name: username
test_class.declarator: token = Randomness.uniquify("token")
test_class.modifier: private final
test_class.original_string: private final String token = Randomness.uniquify("token");
test_class.type: String
test_class.var_name: token
test_class.declarator: restTemplate
test_class.modifier: @Autowired
    private
test_class.original_string: @Autowired
    private FixedUrlRestTemplate restTemplate;
test_class.type: FixedUrlRestTemplate
test_class.var_name: restTemplate
test_class.declarator: authenticationService
test_class.modifier: @Autowired
    private
test_class.original_string: @Autowired
    private AuthenticationService authenticationService;
test_class.type: AuthenticationService
test_class.var_name: authenticationService
test_class.file: manager/src/test/java/io/servicecomb/company/manager/AuthenticationServiceTest.java
test_class.identifier: AuthenticationServiceTest
test_case.body: @Test
    public void timesOutWhenDoormanIsUnresponsive() {
      ResponseEntity<String> responseEntity = authenticationService.validate(token);
  
      assertThat(responseEntity.getStatusCode()).isEqualTo(REQUEST_TIMEOUT);
    }
test_case.class_method_signature: AuthenticationServiceTest.timesOutWhenDoormanIsUnresponsive()
test_case.full_signature: @Test public void timesOutWhenDoormanIsUnresponsive()
test_case.identifier: timesOutWhenDoormanIsUnresponsive
test_case.invocations: validate isEqualTo assertThat getStatusCode
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void timesOutWhenDoormanIsUnresponsive()
focal_class.declarator: logger = LoggerFactory.getLogger(AuthenticationService.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(AuthenticationService.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: DOORMAN_ADDRESS = "cse://doorman"
focal_class.modifier: private static final
focal_class.original_string: private static final String DOORMAN_ADDRESS = "cse://doorman";
focal_class.type: String
focal_class.var_name: DOORMAN_ADDRESS
focal_class.declarator: restTemplate
focal_class.modifier: private final
focal_class.original_string: private final RestTemplate restTemplate;
focal_class.type: RestTemplate
focal_class.var_name: restTemplate
focal_class.file: manager/src/main/java/io/servicecomb/company/manager/AuthenticationService.java
focal_class.identifier: AuthenticationService
focal_class.class_method_signature: AuthenticationService.AuthenticationService(RestTemplate restTemplate)
focal_class.full_signature: @Autowired  AuthenticationService(RestTemplate restTemplate)
focal_class.identifier: AuthenticationService
focal_class.modifiers: @Autowired
focal_class.parameters: (RestTemplate restTemplate)
focal_class.signature:  AuthenticationService(RestTemplate restTemplate)
focal_class.class_method_signature: AuthenticationService.validate(String token)
focal_class.full_signature: @HystrixCommand(fallbackMethod = "timeout") public ResponseEntity<String> validate(String token)
focal_class.identifier: validate
focal_class.modifiers: @HystrixCommand(fallbackMethod = "timeout") public
focal_class.parameters: (String token)
focal_class.return: ResponseEntity<String>
focal_class.signature: ResponseEntity<String> validate(String token)
focal_class.class_method_signature: AuthenticationService.timeout(String token)
focal_class.full_signature: private ResponseEntity<String> timeout(String token)
focal_class.identifier: timeout
focal_class.modifiers: private
focal_class.parameters: (String token)
focal_class.return: ResponseEntity<String>
focal_class.signature: ResponseEntity<String> timeout(String token)
focal_class.class_method_signature: AuthenticationService.validationRequest(String token)
focal_class.full_signature: private HttpEntity<Token> validationRequest(String token)
focal_class.identifier: validationRequest
focal_class.modifiers: private
focal_class.parameters: (String token)
focal_class.return: HttpEntity<Token>
focal_class.signature: HttpEntity<Token> validationRequest(String token)
focal_method.body: @HystrixCommand(fallbackMethod = "timeout")
    public ResponseEntity<String> validate(String token) {
      logger.info("Validating token {}", token);
      ResponseEntity<String> responseEntity = restTemplate.postForEntity(
          DOORMAN_ADDRESS + "/rest/validate",
          validationRequest(token),
          String.class
      );
  
      if (!responseEntity.getStatusCode().is2xxSuccessful()) {
        logger.warn("No such user found with token {}", token);
      }
      logger.info("Validated request of token {} to be user {}", token, responseEntity.getBody());
      return responseEntity;
    }
focal_method.class_method_signature: AuthenticationService.validate(String token)
focal_method.full_signature: @HystrixCommand(fallbackMethod = "timeout") public ResponseEntity<String> validate(String token)
focal_method.identifier: validate
focal_method.invocations: info postForEntity validationRequest is2xxSuccessful getStatusCode warn info getBody
focal_method.modifiers: @HystrixCommand(fallbackMethod = "timeout") public
focal_method.parameters: (String token)
focal_method.return: ResponseEntity<String>
focal_method.signature: ResponseEntity<String> validate(String token)