//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void testLoggingOfOriginalErrorWhenOutputIsClosed(org.neo4j.bolt.runtime.Neo4jError original) throws Exception
        private static void TestLoggingOfOriginalErrorWhenOutputIsClosed(Neo4jError original)
        {
            PackOutputClosedException outputClosed = new PackOutputClosedException("Output closed", "<client>");
            AssertableLogProvider     logProvider  = EmulateFailureWritingError(original, outputClosed);

            logProvider.AssertExactly(inLog("Test").warn(startsWith("Unable to send error back to the client"), equalTo(original.Cause())));
        }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldLogShortWarningOnClientDisconnectMidwayThroughQuery() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldLogShortWarningOnClientDisconnectMidwayThroughQuery()
        {
            // Connections dying is not exceptional per-se, so we don't need to fill the log with
            // eye-catching stack traces; but it could be indicative of some issue, so log a brief
            // warning in the debug log at least.

            // Given
            PackOutputClosedException outputClosed = new PackOutputClosedException("Output closed", "<client>");
            Neo4jError txTerminated = Neo4jError.from(new TransactionTerminatedException(Org.Neo4j.Kernel.Api.Exceptions.Status_Transaction.Terminated));

            // When
            AssertableLogProvider logProvider = EmulateFailureWritingError(txTerminated, outputClosed);

            // Then
            logProvider.AssertExactly(inLog("Test").warn(equalTo("Client %s disconnected while query was running. Session has been cleaned up. " + "This can be caused by temporary network problems, but if you see this often, ensure your " + "applications are properly waiting for operations to complete before exiting."), equalTo("<client>")));
        }