### Question:
MessageMetadataParser { static Duration parseTransactionTimeout( MapValue meta ) throws BoltIOException { AnyValue anyValue = meta.get( TX_TIMEOUT_KEY ); if ( anyValue == Values.NO_VALUE ) { return null; } else if ( anyValue instanceof LongValue ) { return Duration.ofMillis( ((LongValue) anyValue).longValue() ); } else { throw new BoltIOException( Status.Request.Invalid, "Expecting transaction timeout value to be a Long value, but got: " + anyValue ); } } private  MessageMetadataParser();   }### Answer:
@Test void shouldAllowNoTransactionTimeout() throws Exception { assertNull( parseTransactionTimeout( emptyMap() ) ); }
@Test void shouldThrowForIncorrectTransactionTimeout() { BoltIOException e = assertThrows( BoltIOException.class, () -> parseTransactionTimeout( asMapValue( map( "tx_timeout", "15 minutes" ) ) ) ); assertTrue( e.causesFailureMessage() ); }