// Path: hamcrest/hamcrest-matchers/src/test/java/it/ozimov/cirneco/hamcrest/BaseMatcherTest.java
// @RunWith(MockitoJUnitRunner.class)
// public abstract class BaseMatcherTest {
// 
//     @Rule
//     public ExpectedException thrown = ExpectedException.none();
// 
//     public static <T> void assertMatches(final String message, final boolean matches) {
//         assertTrue(message, matches);
//     }
// 
//     public static <T> void assertMatches(final boolean matches) {
//         assertMatches("Expected to match, but mismatched", matches);
//     }
// 
//     public static <T> void assertDoesNotMatch(final String message, final boolean matches) {
//         assertFalse(message, matches);
//     }
// 
//     public static <T> void assertDoesNotMatch(final boolean matches) {
//         assertDoesNotMatch("Unexpected matching", matches);
//     }
// 
//     public static void assertIsDescribedTo(final String expectedDescription, final Matcher<?> matcher) {
// 
//         // Act
//         final String actualDescription = descriptionFromMatcher(matcher);
// 
//         // Assert
//         assertThat("Expected description does not match the one returned by the Matcher " + getSimpleName(matcher),
//                 expectedDescription, equalTo(actualDescription));
//     }
// 
//     public static <T> void assertHasMismatchDescription(final String expectedDescription,
//                                                         final Matcher<? super T> matcher, final T matcherArgument) {
// 
//         // Assert
//         assertThat(format("The given matcher has no mismatch with value \"%s\"", matcherArgument),
//                 matcher.matches(matcherArgument), is(false));
// 
//         // Act
//         final String actualMismatchDescription = mismatchDescriptionForMatcherFromArgument(matcher, matcherArgument);
// 
//         // Assert
//         assertThat("Expected mismatch description does not match the one returned by the Matcher "
//                 + getSimpleName(matcher), expectedDescription, equalTo(actualMismatchDescription));
//     }
// 
//     private static String descriptionFromMatcher(final Matcher<?> matcher) {
//         return new StringDescription().appendDescriptionOf(matcher).toString().trim();
//     }
// 
//     protected static <T> String mismatchDescriptionForMatcherFromArgument(final Matcher<? super T> matcher,
//                                                                           final T arg) {
//         final Description description = new StringDescription();
//         matcher.describeMismatch(arg, description);
// 
//         return description.toString().trim();
//     }
// 
//     private static String getSimpleName(final Matcher<?> matcher) {
//         return matcher.getClass().getSimpleName();
//     }
// 
// }
// 
// Path: hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/collect/utils/IterableUtils.java
// public static <K> boolean isEmpty(final Iterable<? super K> iterable) {
//     checkNotNull(iterable);
// 
//     return !iterable.iterator().hasNext();
// }


import com.google.common.collect.ImmutableList;
import it.ozimov.cirneco.hamcrest.BaseMatcherTest;
import org.hamcrest.Matcher;
import org.junit.Before;
import org.junit.Test;
import java.util.Comparator;
import static it.ozimov.cirneco.hamcrest.collect.utils.IterableUtils.isEmpty;
import static org.junit.Assume.assumeTrue;
        comparator = new Comparator<Integer>() {

            @Override
            public int compare(final Integer o1, final Integer o2) {
                return -1 * Integer.compare(o1, o2);
            }
        };

        isSortedIterableMatcher = IsSortedIterableWithComparator.sorted(comparator);
        isReversedSortedIterableMatcher = IsSortedIterableWithComparator.sortedReversed(comparator);
    }

    @Test
    public void testGivenAnEmptyIterableWhenMatchesForSortedMatcherIsCalledThenTrueIsReturned() throws Exception {

        // Arrange
        assumeTrue(isEmpty(emptyIterable));

        // Act
        final boolean matches = isSortedIterableMatcher.matches(emptyIterable);

        // Assert
        assertMatches(matches);
    }

    @Test
    public void testGivenAnEmptyIterableWhenMatchesForSortedReversedMatcherIsCalledThenTrueIsReturned()
            throws Exception {

        // Arrange
// Path: hamcrest/hamcrest-matchers/src/test/java/it/ozimov/cirneco/hamcrest/BaseMatcherTest.java
// @RunWith(MockitoJUnitRunner.class)
// public abstract class BaseMatcherTest {
// 
//     @Rule
//     public ExpectedException thrown = ExpectedException.none();
// 
//     public static <T> void assertMatches(final String message, final boolean matches) {
//         assertTrue(message, matches);
//     }
// 
//     public static <T> void assertMatches(final boolean matches) {
//         assertMatches("Expected to match, but mismatched", matches);
//     }
// 
//     public static <T> void assertDoesNotMatch(final String message, final boolean matches) {
//         assertFalse(message, matches);
//     }
// 
//     public static <T> void assertDoesNotMatch(final boolean matches) {
//         assertDoesNotMatch("Unexpected matching", matches);
//     }
// 
//     public static void assertIsDescribedTo(final String expectedDescription, final Matcher<?> matcher) {
// 
//         // Act
//         final String actualDescription = descriptionFromMatcher(matcher);
// 
//         // Assert
//         assertThat("Expected description does not match the one returned by the Matcher " + getSimpleName(matcher),
//                 expectedDescription, equalTo(actualDescription));
//     }
// 
//     public static <T> void assertHasMismatchDescription(final String expectedDescription,
//                                                         final Matcher<? super T> matcher, final T matcherArgument) {
// 
//         // Assert
//         assertThat(format("The given matcher has no mismatch with value \"%s\"", matcherArgument),
//                 matcher.matches(matcherArgument), is(false));
// 
//         // Act
//         final String actualMismatchDescription = mismatchDescriptionForMatcherFromArgument(matcher, matcherArgument);
// 
//         // Assert
//         assertThat("Expected mismatch description does not match the one returned by the Matcher "
//                 + getSimpleName(matcher), expectedDescription, equalTo(actualMismatchDescription));
//     }
// 
//     private static String descriptionFromMatcher(final Matcher<?> matcher) {
//         return new StringDescription().appendDescriptionOf(matcher).toString().trim();
//     }
// 
//     protected static <T> String mismatchDescriptionForMatcherFromArgument(final Matcher<? super T> matcher,
//                                                                           final T arg) {
//         final Description description = new StringDescription();
//         matcher.describeMismatch(arg, description);
// 
//         return description.toString().trim();
//     }
// 
//     private static String getSimpleName(final Matcher<?> matcher) {
//         return matcher.getClass().getSimpleName();
//     }
// 
// }
// 
// Path: hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/collect/utils/IterableUtils.java
// public static <K> boolean isEmpty(final Iterable<? super K> iterable) {
//     checkNotNull(iterable);
// 
//     return !iterable.iterator().hasNext();
// }


// Path: hamcrest/hamcrest-matchers/src/test/java/it/ozimov/cirneco/hamcrest/collect/IsSortedIterableWithComparatorTest.java
import com.google.common.collect.ImmutableList;
import it.ozimov.cirneco.hamcrest.BaseMatcherTest;
import org.hamcrest.Matcher;
import org.junit.Before;
import org.junit.Test;
import java.util.Comparator;
import static it.ozimov.cirneco.hamcrest.collect.utils.IterableUtils.isEmpty;
import static org.junit.Assume.assumeTrue;

        comparator = new Comparator<Integer>() {

            @Override
            public int compare(final Integer o1, final Integer o2) {
                return -1 * Integer.compare(o1, o2);
            }
        };

        isSortedIterableMatcher = IsSortedIterableWithComparator.sorted(comparator);
        isReversedSortedIterableMatcher = IsSortedIterableWithComparator.sortedReversed(comparator);
    }

    @Test
    public void testGivenAnEmptyIterableWhenMatchesForSortedMatcherIsCalledThenTrueIsReturned() throws Exception {

        // Arrange
        assumeTrue(isEmpty(emptyIterable));

        // Act
        final boolean matches = isSortedIterableMatcher.matches(emptyIterable);

        // Assert
        assertMatches(matches);
    }

    @Test
    public void testGivenAnEmptyIterableWhenMatchesForSortedReversedMatcherIsCalledThenTrueIsReturned()
            throws Exception {

        // Arrange
        assumeTrue(isEmpty(emptyIterable));