3
import static org.hamcrest.AbstractMatcherTest.assertDescription;
4
import junit.framework.TestCase;
6
public class CustomMatcherTest extends TestCase {
8
public void testUsesStaticDescription() throws Exception {
9
Matcher<String> matcher = new CustomMatcher<String>("I match strings") {
10
public boolean matches(Object item) {
11
return (item instanceof String);
15
assertDescription("I match strings", matcher);