### Question:
TransactionHandleRegistry implements TransactionRegistry { @Override public TransactionHandle acquire( long id ) throws TransactionLifecycleException { TransactionMarker marker = registry.get( id ); if ( null == marker ) { throw new InvalidTransactionId(); } SuspendedTransaction transaction = marker.getSuspendedTransaction(); if ( registry.replace( id, marker, marker.getActiveTransaction() ) ) { return transaction.transactionHandle; } else { throw new InvalidConcurrentTransactionAccess(); } } 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 public void acquiringANonExistentTransactionShouldThrowErrorInvalidTransactionId() throws Exception { AssertableLogProvider logProvider = new AssertableLogProvider(); TransactionHandleRegistry registry = new TransactionHandleRegistry( Clocks.fakeClock(), 0, logProvider ); long madeUpTransactionId = 1337; try { registry.acquire( madeUpTransactionId ); fail( "Should have thrown exception" ); } catch ( InvalidTransactionId e ) { } logProvider.assertNoLoggingOccurred(); }