### Question:
ServerCallImpl extends ServerCall<ReqT, RespT> { @Override public String getAuthority() { return stream.getAuthority(); } ServerCallImpl(ServerStream stream, MethodDescriptor<ReqT, RespT> method,
      Metadata inboundHeaders, Context.CancellableContext context,
      DecompressorRegistry decompressorRegistry, CompressorRegistry compressorRegistry,
      CallTracer serverCallTracer); @Override void request(int numMessages); @Override void sendHeaders(Metadata headers); @Override void sendMessage(RespT message); @Override void setMessageCompression(boolean enable); @Override void setCompression(String compressorName); @Override boolean isReady(); @Override void close(Status status, Metadata trailers); @Override boolean isCancelled(); @Override Attributes getAttributes(); @Override String getAuthority(); @Override MethodDescriptor<ReqT, RespT> getMethodDescriptor();  }### Answer:
@Test public void getAuthority() { when(stream.getAuthority()).thenReturn("fooapi.googleapis.com"); assertEquals("fooapi.googleapis.com", call.getAuthority()); verify(stream).getAuthority(); }
@Test public void getNullAuthority() { when(stream.getAuthority()).thenReturn(null); assertNull(call.getAuthority()); verify(stream).getAuthority(); }