// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> hasContent(final String expectedContent) {
//     return new TypeSafeDiagnosingMatcher<Token>() {
// 
//         @Override
//         public void describeTo(final Description description) {
//             description.appendText("token has content ");
//             description.appendValue(expectedContent);
//         }
// 
//         @Override
//         protected boolean matchesSafely(final Token item,
//                 final Description mismatchDescription) {
//             mismatchDescription.appendText("token content is ");
//             mismatchDescription.appendValue(item.content.toString());
//             return expectedContent.equals(item.content.toString());
//         }
//     };
// }
// 
// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> hasType(final Token.Type expectedType) {
//     return new TypeSafeDiagnosingMatcher<Token>() {
// 
//         @Override
//         public void describeTo(final Description description) {
//             description.appendText("token has type ");
//             description.appendValue(expectedType);
//         }
// 
//         @Override
//         protected boolean matchesSafely(final Token item,
//                 final Description mismatchDescription) {
//             mismatchDescription.appendText("token type is ");
//             mismatchDescription.appendValue(item.type);
//             return item.type == expectedType;
//         }
//     };
// }
// 
// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> isReady() {
//     return new TypeSafeDiagnosingMatcher<Token>() {
// 
//         @Override
//         public void describeTo(final Description description) {
//             description.appendText("token is ready ");
//         }
// 
//         @Override
//         protected boolean matchesSafely(final Token item,
//                 final Description mismatchDescription) {
//             mismatchDescription.appendText("token is not ready ");
//             return item.isReady;
//         }
//     };
// }
// 
// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> matches(final Token.Type expectedType, final String expectedContent) {
//     return allOf(hasType(expectedType), hasContent(expectedContent));
// }


import static org.apache.commons.csv.TokenMatchers.hasContent;
import static org.apache.commons.csv.TokenMatchers.hasType;
import static org.apache.commons.csv.TokenMatchers.isReady;
import static org.apache.commons.csv.TokenMatchers.matches;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.csv;



public class TokenMatchersTest {

    private Token token;

    @BeforeEach
    public void setUp() {
        token = new Token();
        token.type = Token.Type.TOKEN;
        token.isReady = true;
        token.content.append("content");
    }

    @Test
    public void testHasContent() {
        assertFalse(hasContent("This is not the token's content").matches(token));
        assertTrue(hasContent("content").matches(token));
    }

// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> hasContent(final String expectedContent) {
//     return new TypeSafeDiagnosingMatcher<Token>() {
// 
//         @Override
//         public void describeTo(final Description description) {
//             description.appendText("token has content ");
//             description.appendValue(expectedContent);
//         }
// 
//         @Override
//         protected boolean matchesSafely(final Token item,
//                 final Description mismatchDescription) {
//             mismatchDescription.appendText("token content is ");
//             mismatchDescription.appendValue(item.content.toString());
//             return expectedContent.equals(item.content.toString());
//         }
//     };
// }
// 
// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> hasType(final Token.Type expectedType) {
//     return new TypeSafeDiagnosingMatcher<Token>() {
// 
//         @Override
//         public void describeTo(final Description description) {
//             description.appendText("token has type ");
//             description.appendValue(expectedType);
//         }
// 
//         @Override
//         protected boolean matchesSafely(final Token item,
//                 final Description mismatchDescription) {
//             mismatchDescription.appendText("token type is ");
//             mismatchDescription.appendValue(item.type);
//             return item.type == expectedType;
//         }
//     };
// }
// 
// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> isReady() {
//     return new TypeSafeDiagnosingMatcher<Token>() {
// 
//         @Override
//         public void describeTo(final Description description) {
//             description.appendText("token is ready ");
//         }
// 
//         @Override
//         protected boolean matchesSafely(final Token item,
//                 final Description mismatchDescription) {
//             mismatchDescription.appendText("token is not ready ");
//             return item.isReady;
//         }
//     };
// }
// 
// Path: src/test/java/org/apache/commons/csv/TokenMatchers.java
// public static Matcher<Token> matches(final Token.Type expectedType, final String expectedContent) {
//     return allOf(hasType(expectedType), hasContent(expectedContent));
// }


// Path: src/test/java/org/apache/commons/csv/TokenMatchersTest.java
import static org.apache.commons.csv.TokenMatchers.hasContent;
import static org.apache.commons.csv.TokenMatchers.hasType;
import static org.apache.commons.csv.TokenMatchers.isReady;
import static org.apache.commons.csv.TokenMatchers.matches;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.commons.csv;



public class TokenMatchersTest {

    private Token token;

    @BeforeEach
    public void setUp() {
        token = new Token();
        token.type = Token.Type.TOKEN;
        token.isReady = true;
        token.content.append("content");
    }

    @Test
    public void testHasContent() {
        assertFalse(hasContent("This is not the token's content").matches(token));
        assertTrue(hasContent("content").matches(token));
    }

    @Test