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) {
    return TokenState.VALID;
  }
}

@@ -520,32 +520,40 @@
 art() %7B%0A    
-// no-op
+notifyStarted();
 %0A  %7D%0A%0A  @Ove
@@ -594,16 +594,24 @@
     
-// no-op
+notifyStopped();
 %0A  %7D

Fix start & stop handling of test TokenValidator