@Test
public void testGetAllColumnNamesWithTransaction_failure() {

    final String sql = "select c.name from Column c";
    final Query query = mock(Query.class);
    when(persistenceManager.createQuery(sql)).thenReturn(query);
    doThrow(new PersistenceException(null, null, null, true)).when(query).getResultList();
    try {
        columnStorage.getAllColumnNamesWithTransaction();
        fail("ToolException expected");
    } catch (ToolException expected) {
    }
    verify(persistenceManager, times(1)).transaction();
    verify(persistenceManager, times(1)).createQuery(sql);
    verifyNoMoreInteractions(persistenceManager);
    verify(query, times(1)).getResultList();
    verifyNoMoreInteractions(query);
}