@Test
public void testUnitOfWorkAddWorkOnNotStarted() {

    
    UnitOfWork unit = unitOfWorkManager.newUnitOfWork();
    assertThat(unit).isNotNull().isInstanceOf(ManagedUnitOfWork.class);
    
    final AtomicInteger counter = new AtomicInteger(0);
    assertThat(counter.get()).isEqualTo(0);
    
    WorkUnit<AtomicInteger> dummyWork = WorkUnit.create(counter, (d) -> d.incrementAndGet());
    
    assertThrows(IllegalStateException.class, () -> unit.intercept(dummyWork), "Cannot intercept on not started unit");
          
}