@Test public void toGetServersResponse() { assertEquals( GetServersResponse.getDefaultInstance(), ChannelzProtoUtil.toGetServersResponse( new ServerList(Collections.<InternalInstrumented<ServerStats>>emptyList(), false))); assertEquals( GetServersResponse .newBuilder() .addServer(serverProto) .build(), ChannelzProtoUtil.toGetServersResponse( new ServerList(ImmutableList.<InternalInstrumented<ServerStats>>of(server), false))); assertEquals( GetServersResponse .newBuilder() .addServer(serverProto) .setEnd(true) .build(), ChannelzProtoUtil.toGetServersResponse( new ServerList(ImmutableList.<InternalInstrumented<ServerStats>>of(server), true))); TestServer server2 = new TestServer(); assertEquals( GetServersResponse .newBuilder() .addServer(serverProto) .addServer(ChannelzProtoUtil.toServer(server2)) .setEnd(true) .build(), ChannelzProtoUtil.toGetServersResponse( new ServerList( ImmutableList.<InternalInstrumented<ServerStats>>of(server, server2), true))); }
static GetServersResponse toGetServersResponse(ServerList servers) { GetServersResponse.Builder responseBuilder = GetServersResponse .newBuilder() .setEnd(servers.end); for (InternalInstrumented<ServerStats> s : servers.servers) { responseBuilder.addServer(ChannelzProtoUtil.toServer(s)); } return responseBuilder.build(); }
ChannelzProtoUtil { static GetServersResponse toGetServersResponse(ServerList servers) { GetServersResponse.Builder responseBuilder = GetServersResponse .newBuilder() .setEnd(servers.end); for (InternalInstrumented<ServerStats> s : servers.servers) { responseBuilder.addServer(ChannelzProtoUtil.toServer(s)); } return responseBuilder.build(); } }
ChannelzProtoUtil { static GetServersResponse toGetServersResponse(ServerList servers) { GetServersResponse.Builder responseBuilder = GetServersResponse .newBuilder() .setEnd(servers.end); for (InternalInstrumented<ServerStats> s : servers.servers) { responseBuilder.addServer(ChannelzProtoUtil.toServer(s)); } return responseBuilder.build(); } private  ChannelzProtoUtil(); }
ChannelzProtoUtil { static GetServersResponse toGetServersResponse(ServerList servers) { GetServersResponse.Builder responseBuilder = GetServersResponse .newBuilder() .setEnd(servers.end); for (InternalInstrumented<ServerStats> s : servers.servers) { responseBuilder.addServer(ChannelzProtoUtil.toServer(s)); } return responseBuilder.build(); } private  ChannelzProtoUtil();  }
ChannelzProtoUtil { static GetServersResponse toGetServersResponse(ServerList servers) { GetServersResponse.Builder responseBuilder = GetServersResponse .newBuilder() .setEnd(servers.end); for (InternalInstrumented<ServerStats> s : servers.servers) { responseBuilder.addServer(ChannelzProtoUtil.toServer(s)); } return responseBuilder.build(); } private  ChannelzProtoUtil();  static final String SO_LINGER; static final String SO_TIMEOUT; static final String TCP_INFO; }