Let's say you have this code:
textview.setText("This Is Camel Case");
And you want to interact with it in an Espresso test:
import static android.support.test.espresso.matcher.ViewMatchers.withText;
onView(withText("this is camel case"))
.check(matches(isDisplayed()));
This view would fail the matcher because of the capital letters. But using this matcher will be fine:
import static com.example.app.IgnoreCaseTextMatcher.withText;
onView(withText("this is camel case"))
.check(matches(isDisplayed()));
what about situation when you are getting string from resource?
onView(withText(R.string.kb_change_maturity_details_cc))