TransactionChainProxy extends AbstractTransactionContextFactory<LocalTransactionChain> implements DOMStoreTransactionChain { @Override public void close() { currentState = CLOSED_STATE; getActorUtils().broadcast(version -> new CloseTransactionChain(getHistoryId(), version).toSerializable(), CloseTransactionChain.class); } TransactionChainProxy(final TransactionContextFactory parent, final LocalHistoryIdentifier historyId); @Override DOMStoreReadTransaction newReadOnlyTransaction(); @Override DOMStoreReadWriteTransaction newReadWriteTransaction(); @Override DOMStoreWriteTransaction newWriteOnlyTransaction(); @Override void close();  }
@SuppressWarnings("unchecked") @Test public void testClose() { new TransactionChainProxy(mockComponentFactory, historyId).close(); verify(mockActorContext, times(1)).broadcast(any(Function.class), any(Class.class)); }