@@ -0,0 +1,807 @@
+package net.cattaka.android.snippets.test;%0A%0Aimport android.support.test.espresso.matcher.BoundedMatcher;%0Aimport android.widget.EditText;%0A%0Aimport org.hamcrest.Matcher;%0A%0A/**%0A * Created by cattaka on 16/05/02.%0A */%0Apublic class CustomMatchers %7B%0A    public static Matcher%3CObject%3E hasInputType(final int inputType) %7B%0A        return new BoundedMatcher%3CObject, EditText%3E(EditText.class) %7B%0A            int v;%0A%0A            @Override%0A            protected boolean matchesSafely(EditText editText) %7B%0A                v = editText.getInputType();%0A                return v == inputType;%0A            %7D%0A%0A            @Override%0A            public void describeTo(org.hamcrest.Description description) %7B%0A                description.appendText(%22has inputyType:%22 + inputType + %22, but has %22 + v);%0A            %7D%0A        %7D;%0A    %7D%0A%7D%0A

Add CustomMatchers