public static Matcher<TableRow> rowWithColumn(final int columnNumber, final Matcher<String> matcher) {
		return new DiagnosingMatcher<TableRow>() {

			@Override
			public void describeTo(Description description) {
				description.appendText("a row with column ").appendValue(columnNumber).appendText(" ").appendDescriptionOf(
						matcher);
			}

			@Override
			protected boolean matches(Object item, Description mismatchDescription) {
				matcher.describeMismatch(item, mismatchDescription);
				TableRow row = (TableRow) item;
				return matcher.matches(row.getValue(columnNumber));
			}
		};
	}
A matcher that matches if contents of some column matches.
spring-xd-shell/src/test/java/org/springframework/xd/shell/util/TableMatchers.java