@Test(description = "This test case tests handling SQLException when checking is compliant",
      dependsOnMethods = "testIsCompliantThrowingMonitoringDAOException",
      expectedExceptions = IllegalTransactionStateException.class)
public void testIsCompliantThrowingIllegalTransactionStateException() throws Exception {

    Pair<Connection, Pair<DataSource, DataSource>> pair = mockConnection();
    PowerMockito.doThrow(new SQLException()).when(pair.second().second()).getConnection();
    try {
        DeviceIdentifier deviceIdentifier = new DeviceIdentifier();
        deviceIdentifier.setType(DEVICE_TYPE_E);
        deviceIdentifier.setId(String.valueOf(device5.getDeviceIdentifier()));
        monitoringManager.isCompliant(deviceIdentifier);
    } finally {
        PolicyManagementDAOFactory.init(pair.second().first());
    }
}