@Test(description = "This test case tests handling SQLException when retrieving features of a profile",
      dependsOnMethods = "testGetFeaturesForProfileThrowingFeatureManagerDAOException",
      expectedExceptions = IllegalTransactionStateException.class)
public void testGetFeaturesForProfileThrowingIllegalTransactionStateException() throws Exception {

    Pair<Connection, Pair<DataSource, DataSource>> pair = mockConnection();
    PowerMockito.doThrow(new SQLException()).when(pair.second().second()).getConnection();
    try {
        featureManager.getFeaturesForProfile(profile1.getProfileId());
    } finally {
        PolicyManagementDAOFactory.init(pair.second().first());
    }
}