private void assertSplits(String[] expectedSplitRE,
List<InputSplit> splits) throws IOException {
assertEquals(expectedSplitRE.length, splits.size());
for (int i = 0; i < expectedSplitRE.length; i++) {
DataDrivenDBInputSplit split = (DataDrivenDBInputSplit) splits.get(i);
String actualExpr = split.getLowerClause() + " " + split.getUpperClause();
assertTrue("Split #" + (i+1) + " expression is wrong."
+ " Expected " + expectedSplitRE[i]
+ " Actual " + actualExpr,
Pattern.matches(expectedSplitRE[i], actualExpr));
}