// Path: src/main/java/org/gwtproject/place/shared/Place.java
// public abstract class Place {
// 
//   /** The null place. */
//   public static final Place NOWHERE = new Place() {};
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place1.java
// public class Place1 extends Place {
//   public final String content;
// 
//   public Place1(String token) {
//     this.content = token;
//   }
// 
//   /** Tokenizer. */
//   @Prefix(Tokenizer.PREFIX)
//   public static class Tokenizer implements PlaceTokenizer<Place1> {
//     public static final String PREFIX = "T1";
// 
//     @Override
//     public Place1 getPlace(String token) {
//       return new Place1(token);
//     }
// 
//     @Override
//     public String getToken(Place1 place) {
//       return place.content;
//     }
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place2.java
// public class Place2 extends Place {
//   public final String content;
// 
//   public Place2(String token) {
//     this.content = token;
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place3.java
// public class Place3 extends Place1 {
// 
//   public Place3(String token) {
//     super(token);
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place4.java
// public class Place4 extends Place1 {
// 
//   public Place4(String token) {
//     super(token);
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place5.java
// public class Place5 extends Place3 {
// 
//   public Place5(String token) {
//     super(token);
//   }
// }


import static com.google.common.truth.Truth.*;
import com.google.testing.compile.CompilationRule;
import java.util.Arrays;
import java.util.List;
import javax.lang.model.element.TypeElement;
import org.gwtproject.place.shared.Place;
import org.gwtproject.place.testplaces.Place1;
import org.gwtproject.place.testplaces.Place2;
import org.gwtproject.place.testplaces.Place3;
import org.gwtproject.place.testplaces.Place4;
import org.gwtproject.place.testplaces.Place5;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
    }
  }

  @Test
  public void testPlaceComparesGreaterThanAnyDerivedClass() {
    for (TypeElement p : new TypeElement[] {place1, place2, place3, place4, place5}) {
      assertWithMessage(String.format("compare(place, %s)", p))
          .that(comparator.compare(place, p))
          .isGreaterThan(0);
      assertWithMessage(String.format("compare(%s, place)", p))
          .that(comparator.compare(p, place))
          .isLessThan(0);
    }
  }

  @Test
  public void testPlaceInheritanceOrder() {
    // Place3 extends Place1
    assertThat(comparator.compare(place1, place3)).isGreaterThan(0);
    assertThat(comparator.compare(place3, place1)).isLessThan(0);

    // Place5 extends Place3 extends Place1
    assertThat(comparator.compare(place1, place5)).isGreaterThan(0);
    assertThat(comparator.compare(place5, place1)).isLessThan(0);

    // Place4 extends Place1
    assertThat(comparator.compare(place1, place4)).isGreaterThan(0);
    assertThat(comparator.compare(place4, place1)).isLessThan(0);

    // Place5 extends Place3
// Path: src/main/java/org/gwtproject/place/shared/Place.java
// public abstract class Place {
// 
//   /** The null place. */
//   public static final Place NOWHERE = new Place() {};
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place1.java
// public class Place1 extends Place {
//   public final String content;
// 
//   public Place1(String token) {
//     this.content = token;
//   }
// 
//   /** Tokenizer. */
//   @Prefix(Tokenizer.PREFIX)
//   public static class Tokenizer implements PlaceTokenizer<Place1> {
//     public static final String PREFIX = "T1";
// 
//     @Override
//     public Place1 getPlace(String token) {
//       return new Place1(token);
//     }
// 
//     @Override
//     public String getToken(Place1 place) {
//       return place.content;
//     }
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place2.java
// public class Place2 extends Place {
//   public final String content;
// 
//   public Place2(String token) {
//     this.content = token;
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place3.java
// public class Place3 extends Place1 {
// 
//   public Place3(String token) {
//     super(token);
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place4.java
// public class Place4 extends Place1 {
// 
//   public Place4(String token) {
//     super(token);
//   }
// }
// 
// Path: processor/src/testSupport/java/org/gwtproject/place/testplaces/Place5.java
// public class Place5 extends Place3 {
// 
//   public Place5(String token) {
//     super(token);
//   }
// }


// Path: processor/src/test/java/org/gwtproject/place/processor/MostToLeastDerivedPlaceTypeComparatorTest.java
import static com.google.common.truth.Truth.*;
import com.google.testing.compile.CompilationRule;
import java.util.Arrays;
import java.util.List;
import javax.lang.model.element.TypeElement;
import org.gwtproject.place.shared.Place;
import org.gwtproject.place.testplaces.Place1;
import org.gwtproject.place.testplaces.Place2;
import org.gwtproject.place.testplaces.Place3;
import org.gwtproject.place.testplaces.Place4;
import org.gwtproject.place.testplaces.Place5;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;

    }
  }

  @Test
  public void testPlaceComparesGreaterThanAnyDerivedClass() {
    for (TypeElement p : new TypeElement[] {place1, place2, place3, place4, place5}) {
      assertWithMessage(String.format("compare(place, %s)", p))
          .that(comparator.compare(place, p))
          .isGreaterThan(0);
      assertWithMessage(String.format("compare(%s, place)", p))
          .that(comparator.compare(p, place))
          .isLessThan(0);
    }
  }

  @Test
  public void testPlaceInheritanceOrder() {
    // Place3 extends Place1
    assertThat(comparator.compare(place1, place3)).isGreaterThan(0);
    assertThat(comparator.compare(place3, place1)).isLessThan(0);

    // Place5 extends Place3 extends Place1
    assertThat(comparator.compare(place1, place5)).isGreaterThan(0);
    assertThat(comparator.compare(place5, place1)).isLessThan(0);

    // Place4 extends Place1
    assertThat(comparator.compare(place1, place4)).isGreaterThan(0);
    assertThat(comparator.compare(place4, place1)).isLessThan(0);

    // Place5 extends Place3
    assertThat(comparator.compare(place3, place5)).isGreaterThan(0);