private void assertMatchAndCount(String output, String expectedString, int expectedCount) {
    assertTrue("Did not find expected '" + expectedString + "' in text " +
        output, output.contains(expectedString));
    assertEquals("wrong count of matches of '"  + expectedString + "' in text " +
        output, expectedCount, StringUtils.countMatches(output, expectedString));
  }
Check that the expected string occurs correctly in the output string.
@param output string to probe
@param expectedString string to find in output
@param expectedCount the expected number of occurrences of the expected string
itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcWithMiniHS2ErasureCoding.java