String[] theFinalStates1 = init1;
Exception[] theExceptions = { null, null, null, null, null, null, null,
null };
InvalidTransactionException aInvalidTransactionException;
int loopCount = init1.length;
for (int i = 0; i < loopCount; i++) {
try {
aInvalidTransactionException = new InvalidTransactionException(
init1[i]);
if (theExceptions[i] != null) {
fail();
}
assertEquals(i + " Final state mismatch",
aInvalidTransactionException.getMessage(),
theFinalStates1[i]);
} catch (Exception e) {
if (theExceptions[i] == null) {
fail(i + "Unexpected exception");