### Question:
TransactionHandleRegistry implements TransactionRegistry { @Override public TransactionHandle terminate( long id ) throws TransactionLifecycleException { TransactionMarker marker = registry.get( id ); if ( null == marker ) { throw new InvalidTransactionId(); } TransactionTerminationHandle handle = marker.getActiveTransaction().getTerminationHandle(); handle.terminate(); try { SuspendedTransaction transaction = marker.getSuspendedTransaction(); if ( registry.replace( id, marker, marker.getActiveTransaction() ) ) { return transaction.transactionHandle; } } catch ( InvalidConcurrentTransactionAccess exception ) { } return null; } TransactionHandleRegistry( Clock clock, long timeoutMillis, LogProvider logProvider ); @Override long begin( TransactionHandle handle ); @Override long release( long id, TransactionHandle transactionHandle ); @Override TransactionHandle acquire( long id ); @Override void forget( long id ); @Override TransactionHandle terminate( long id ); @Override void rollbackAllSuspendedTransactions(); void rollbackSuspendedTransactionsIdleSince( final long oldestLastActiveTime );  }### Answer:
@Test( expected = InvalidTransactionId.class ) public void gettingInterruptHandlerForUnknownIdShouldThrowErrorInvalidTransactionId() throws TransactionLifecycleException { AssertableLogProvider logProvider = new AssertableLogProvider(); FakeClock clock = Clocks.fakeClock(); int timeoutLength = 123; TransactionHandleRegistry registry = new TransactionHandleRegistry( clock, timeoutLength, logProvider ); registry.terminate( 456 ); }