// Path: src/main/java/com/github/liblevenshtein/distance/IDistance.java
// public interface IDistance<Term> extends Serializable {
// 
//   /**
//    * Finds the distance between two terms, {@code v} and {@code w}. The distance
//    * between two terms is complemented by their similarity, which is determined
//    * by subtracting their distance from the maximum distance they may be apart.
//    * @param v Term to compare with {@code w}
//    * @param w Term to compare with {@code v}
//    * @return Distance between {@code v} and {@code w}
//    */
//   int between(Term v, Term w);
// }
// 
// Path: src/main/java/com/github/liblevenshtein/transducer/Candidate.java
// @Value
// public class Candidate implements Serializable {
// 
//   private static final long serialVersionUID = 1L;
// 
//   /**
//    * Candidate term from the dictionary automaton.
//    * @return Candidate term from the dictionary automaton.
//    */
//   private final String term;
// 
//   /**
//    * Distance between the candidate term and the query term.
//    * @return Distance between the candidate term and the query term.
//    */
//   private final int distance;
// }


import org.assertj.core.api.AbstractAssert;
import com.github.liblevenshtein.distance.IDistance;
import com.github.liblevenshtein.transducer.Candidate;
package com.github.liblevenshtein.assertion;



/**
 * AssertJ-style assertions for {@link Candidate}s.
 */
public class CandidateAssertions
    extends AbstractAssert<CandidateAssertions, Candidate> {

  /**
   * Constructs a new {@link Candidate} to assert-against.
   * @param actual {@link Candidate} to assert-against.
   */
  public CandidateAssertions(final Candidate actual) {
    super(actual, CandidateAssertions.class);
  }

  /**
   * Builds a new {@link Candidate} to assert-against.
   * @param actual {@link Candidate} to assert-against.
   * @return A new {@link Candidate} to assert-against.
   */
  public static CandidateAssertions assertThat(final Candidate actual) {
    return new CandidateAssertions(actual);
  }

  /**
   * Asserts that the actual distance is the expected distance from the query
   * term, as specified by the distance function.
   * @param distance Distance function for validation.
   * @param queryTerm Term whose distance from the spelling candidate is to be
   *   determined.
   * @return This {@link CandidateAssertions} for fluency.
   * @throws AssertionError When the actual distance differs from what's
   *   expected.
   */
  public CandidateAssertions hasDistance(
// Path: src/main/java/com/github/liblevenshtein/distance/IDistance.java
// public interface IDistance<Term> extends Serializable {
// 
//   /**
//    * Finds the distance between two terms, {@code v} and {@code w}. The distance
//    * between two terms is complemented by their similarity, which is determined
//    * by subtracting their distance from the maximum distance they may be apart.
//    * @param v Term to compare with {@code w}
//    * @param w Term to compare with {@code v}
//    * @return Distance between {@code v} and {@code w}
//    */
//   int between(Term v, Term w);
// }
// 
// Path: src/main/java/com/github/liblevenshtein/transducer/Candidate.java
// @Value
// public class Candidate implements Serializable {
// 
//   private static final long serialVersionUID = 1L;
// 
//   /**
//    * Candidate term from the dictionary automaton.
//    * @return Candidate term from the dictionary automaton.
//    */
//   private final String term;
// 
//   /**
//    * Distance between the candidate term and the query term.
//    * @return Distance between the candidate term and the query term.
//    */
//   private final int distance;
// }


// Path: src/test/java/com/github/liblevenshtein/assertion/CandidateAssertions.java
import org.assertj.core.api.AbstractAssert;
import com.github.liblevenshtein.distance.IDistance;
import com.github.liblevenshtein.transducer.Candidate;

package com.github.liblevenshtein.assertion;



/**
 * AssertJ-style assertions for {@link Candidate}s.
 */
public class CandidateAssertions
    extends AbstractAssert<CandidateAssertions, Candidate> {

  /**
   * Constructs a new {@link Candidate} to assert-against.
   * @param actual {@link Candidate} to assert-against.
   */
  public CandidateAssertions(final Candidate actual) {
    super(actual, CandidateAssertions.class);
  }

  /**
   * Builds a new {@link Candidate} to assert-against.
   * @param actual {@link Candidate} to assert-against.
   * @return A new {@link Candidate} to assert-against.
   */
  public static CandidateAssertions assertThat(final Candidate actual) {
    return new CandidateAssertions(actual);
  }

  /**
   * Asserts that the actual distance is the expected distance from the query
   * term, as specified by the distance function.
   * @param distance Distance function for validation.
   * @param queryTerm Term whose distance from the spelling candidate is to be
   *   determined.
   * @return This {@link CandidateAssertions} for fluency.
   * @throws AssertionError When the actual distance differs from what's
   *   expected.
   */
  public CandidateAssertions hasDistance(
      final IDistance<String> distance,