### Question:
AbstractManagedChannelImplBuilder extends ManagedChannelBuilder<T> { @Override public final T userAgent(@Nullable String userAgent) { this.userAgent = userAgent; return thisT(); } protected  AbstractManagedChannelImplBuilder(String target); protected  AbstractManagedChannelImplBuilder(SocketAddress directServerAddress, String authority); static ManagedChannelBuilder<?> forAddress(String name, int port); static ManagedChannelBuilder<?> forTarget(String target); @Override T maxInboundMessageSize(int max); @Override final T directExecutor(); @Override final T executor(Executor executor); @Override final T intercept(List<ClientInterceptor> interceptors); @Override final T intercept(ClientInterceptor... interceptors); @Override final T nameResolverFactory(NameResolver.Factory resolverFactory); @Override final T loadBalancerFactory(LoadBalancer.Factory loadBalancerFactory); @Override final T enableFullStreamDecompression(); @Override final T decompressorRegistry(DecompressorRegistry registry); @Override final T compressorRegistry(CompressorRegistry registry); @Override final T userAgent(@Nullable String userAgent); @Override final T overrideAuthority(String authority); @Override final T idleTimeout(long value, TimeUnit unit); @Override final T maxRetryAttempts(int maxRetryAttempts); @Override final T maxHedgedAttempts(int maxHedgedAttempts); @Override final T retryBufferSize(long bytes); @Override final T perRpcBufferLimit(long bytes); @Override final T disableRetry(); @Override final T enableRetry(); @Override final T setBinaryLog(BinaryLog binlog); @Override T maxTraceEvents(int maxTraceEvents); @Override ManagedChannel build();  }### Answer:
@Test public void userAgent_normal() { String userAgent = "user-agent/1"; assertEquals(builder, builder.userAgent(userAgent)); assertEquals(userAgent, builder.userAgent); }
@Test public void userAgent_null() { assertEquals(builder, builder.userAgent(null)); assertNull(builder.userAgent); builder.userAgent("user-agent/1"); builder.userAgent(null); assertNull(builder.userAgent); }