@Test
public void testChangeToEndStatus10() {

    // テスト入力データ設定
    BLogicResult blogicResult = new BLogicResult();
    TransactionStatus mockTran = mock(TransactionStatus.class);
    RuntimeException re = new RuntimeException("Test exception.");
    RuntimeException reAtRollback = new RuntimeException("Test exception at Rollback.");

    when(mockPlatformTransactionManager.getTransaction(any(
            DefaultTransactionDefinition.class))).thenReturn(mockTran);
    when(mockSystemDao.selectJob(any(BatchJobManagementParam.class)))
            .thenReturn(new BatchJobData() {
                {
                    setJobSequenceId("0000000001");
                    setCurAppStatus(
                            JobStatusConstants.JOB_STATUS_EXECUTING);
                }
            });
    when(mockSystemDao.updateJobTable(any(
            BatchJobManagementUpdateParam.class))).thenThrow(re);
    doThrow(reAtRollback).when(mockPlatformTransactionManager).rollback(any(
            TransactionStatus.class));

    // テスト実行
    // 結果検証
    try {
        assertFalse(jobStatusChanger.changeToEndStatus("00000001",
                blogicResult));
        fail();
    } catch (Exception e) {
        assertSame(re, e);
    }
    assertThat(logger.getLoggingEvents(), is(asList(debug(
            "[DAL025023] Try to update status jobSequenceId:00000001 changeStatus:2"),
            info("[IAL025023] Skipped processing of updating the job status. This transaction will be attempt to roll-back. jobSequenceId:00000001"),
            error(reAtRollback, "[EAL025064] Failed to rollback transaction. jobSequenceId:00000001"))));
    verify(mockPlatformTransactionManager, never()).commit(mockTran);
    verify(mockPlatformTransactionManager).rollback(mockTran);
}