DefaultUnitOfWorkManager implements UnitOfWorkManager { @Override public UnitOfWork currentUnitOfWork() { UnitOfWork unit = currentUnitOfWork.get(); if (unit == null) { return fallbackUnitOfWork; } return unit; } DefaultUnitOfWorkManager(UnitOfWorkFactory factory);  DefaultUnitOfWorkManager(UnitOfWork fallbackUnitOfWork, UnitOfWorkFactory factory); @Override UnitOfWork currentUnitOfWork(); @Override UnitOfWork newUnitOfWork(); @Override EventManager eventManager();  }
@Test public void testFallbackUnitOfWork() { UnitOfWork unit = unitOfWorkManager.currentUnitOfWork(); assertThat(unit).isNotNull().isInstanceOf(PassThroughUnitOfWork.class); }