@Test
public void testStoreSensorWithTransaction_failure() {

    final Sensor sensor = new SensorBuilder().name("a_sensor").observationType(InsituObservation.class).pattern(4000000000L).build();
    jpaStorage.storeWithTransaction(sensor);
    verify(persistenceManager, times(1)).transaction();
    verify(persistenceManager, times(1)).persist(sensor);
    verify(persistenceManager, times(1)).commit();
    verifyNoMoreInteractions(persistenceManager);
}