@Test
public void testEndTransactions02() throws Exception {

    // テスト入力データ設定
    Map<String, PlatformTransactionManager> tranMap = new HashMap<String, PlatformTransactionManager>();
    PlatformTransactionManager tran = new PlatformTransactionManagerStub();
    PlatformTransactionManager tran2 = new PlatformTransactionManagerStub2();
    tranMap.put("tran", tran);
    tranMap.put("tran2", tran2);
    Map<String, TransactionStatus> statMap = new HashMap<String, TransactionStatus>();
    statMap.put("tran", new TransactionStatusStub());
    statMap.put("tran2", new TransactionStatusStub());
    // テスト実施
    boolean result = true;
    try {
        result = BatchUtil.endTransactions(tranMap, statMap, log);
    } catch (Exception e) {
        e.printStackTrace();
        fail();
        return;
    }
    // 結果検証
    assertFalse(result);
    assertThat(logger.getLoggingEvents().get(3).getMessage(), is(startsWith(
            "[EAL025045] Failed to rollback transaction.")));
}