### Question:
NettyServerTransport implements ServerTransport { @VisibleForTesting static Level getLogLevel(Throwable t) { if (t instanceof IOException && t.getMessage() != null) { for (String msg : QUIET_ERRORS) { if (t.getMessage().equals(msg)) { return Level.FINE; } } } return Level.INFO; } NettyServerTransport(
      Channel channel,
      ChannelPromise channelUnused,
      ProtocolNegotiator protocolNegotiator,
      List<ServerStreamTracer.Factory> streamTracerFactories,
      TransportTracer transportTracer,
      int maxStreams,
      int flowControlWindow,
      int maxMessageSize,
      int maxHeaderListSize,
      long keepAliveTimeInNanos,
      long keepAliveTimeoutInNanos,
      long maxConnectionIdleInNanos,
      long maxConnectionAgeInNanos,
      long maxConnectionAgeGraceInNanos,
      boolean permitKeepAliveWithoutCalls,
      long permitKeepAliveTimeInNanos); void start(ServerTransportListener listener); @Override ScheduledExecutorService getScheduledExecutorService(); @Override void shutdown(); @Override void shutdownNow(Status reason); @Override InternalLogId getLogId(); @Override ListenableFuture<SocketStats> getStats(); @Override String toString();  }### Answer:
@Test public void unknownException() { assertEquals(Level.INFO, getLogLevel(new Exception())); }
@Test public void quiet() { assertEquals(Level.FINE, getLogLevel(new IOException("Connection reset by peer"))); assertEquals(Level.FINE, getLogLevel(new IOException( "An existing connection was forcibly closed by the remote host"))); }
@Test public void nonquiet() { assertEquals(Level.INFO, getLogLevel(new IOException("foo"))); }
@Test public void nullMessage() { IOException e = new IOException(); assertNull(e.getMessage()); assertEquals(Level.INFO, getLogLevel(e)); }