@Test
public void testFailureMode_MalformedTransactionForExactScn()
  throws Exception
{

  final Logger log = Logger.getLogger("TestTrailFilePositionSetter.testFailureMode_MalformedTransactionForExactScn");
  log.info("starting");
  File dir = createTempDir();
  // first SCN is hardcoded always to be 100
  // this adds a non-XML string near the end of the dbupdate for SCN 377, but the SCN value itself is clean:
  createTrailFiles(dir.getAbsolutePath(), TRAIL_FILENAME_PREFIX, 150 /* numTxns, 24 lines each */,
                   1250 /* numLinesPerFile */, 1 /* numLinesPerNewline */, "\n", 0,
                   377 /* corrupt a txn in 3rd file */, "", true, "kilroy");
  TrailFilePositionSetter posSetter = new TrailFilePositionSetter(dir.getAbsolutePath(), TRAIL_FILENAME_PREFIX);
  GGXMLTrailTransactionFinder finder = new GGXMLTrailTransactionFinder();
  FilePositionResult res;
  // with a full XML parser, this should throw an exception; with regexQuery(), it's fine:
  finder.reset();
  res = posSetter.locateFilePosition(377, finder);
  assertFilePositionResult(res, dir, 377, FilePositionResult.Status.FOUND);
  log.info(DONE_STRING);
}