<commit_before>package com.continuuity.gateway.router;

import com.continuuity.security.auth.TokenState;
import com.continuuity.security.auth.TokenValidator;
import com.google.common.util.concurrent.AbstractService;

/**
 * Simple {@link com.continuuity.security.auth.TokenValidator} implementation for test cases, which always
 * returns {@link com.continuuity.security.auth.TokenState#VALID} for all tokens.
 */
public class SuccessTokenValidator extends AbstractService implements TokenValidator {
  @Override
  protected void doStart() {
    // no-op
  }

  @Override
  protected void doStop() {
    // no-op
  }

  @Override
  public TokenState validate(String token) {<commit_msg>Fix start & stop handling of test TokenValidator<commit_after>package com.continuuity.gateway.router;

import com.continuuity.security.auth.TokenState;
import com.continuuity.security.auth.TokenValidator;
import com.google.common.util.concurrent.AbstractService;

/**
 * Simple {@link com.continuuity.security.auth.TokenValidator} implementation for test cases, which always
 * returns {@link com.continuuity.security.auth.TokenState#VALID} for all tokens.
 */
public class SuccessTokenValidator extends AbstractService implements TokenValidator {
  @Override
  protected void doStart() {
    notifyStarted();
  }

  @Override
  protected void doStop() {
    notifyStopped();
  }

  @Override
  public TokenState validate(String token) {
{'fraction_non_alphanumeric': 0.09627547434996486, 'fraction_numerical': 0.0, 'mean_word_length': 4.933333333333334, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2772830', 'n_tokens_mistral': 393, 'n_tokens_neox': 388, 'n_words': 96}