@Test
public void testStoreColumnWithTransaction_failure() {

    final Sensor sensor = new SensorBuilder().name("bah").build();
    final Column column = (Column) new ColumnBuilder().name("Gansta-Rapper").sensor(sensor).build();
    doThrow(new PersistenceException(null, null, null, true)).when(persistenceManager).persist(column);
    try {
        columnStorage.storeWithTransaction(column);
        fail("ToolException expected");
    } catch (ToolException expected) {
    }
    verify(persistenceManager, times(1)).transaction();
    verify(persistenceManager, times(1)).persist(column);
    verify(persistenceManager, times(1)). pick("select s from Sensor s where s.name = ?1", "bah");
    verify(persistenceManager, times(1)).rollback();
    verifyNoMoreInteractions(persistenceManager);
}