CommitTxResponseHandler implements ResponseHandler { @Override public void onRecord( Value[] fields ) { throw new UnsupportedOperationException( "Transaction commit is not expected to receive records: " + Arrays.toString( fields ) ); } CommitTxResponseHandler( CompletableFuture<Bookmark> commitFuture ); @Override void onSuccess( Map<String,Value> metadata ); @Override void onFailure( Throwable error ); @Override void onRecord( Value[] fields );  }
@Test void shouldFailToHandleRecord() { assertThrows( UnsupportedOperationException.class, () -> handler.onRecord( new Value[]{value( 42 )} ) ); }