### Question:
ChannelzProtoUtil { static State toState(ConnectivityState state) { if (state == null) { return State.UNKNOWN; } try { return Enum.valueOf(State.class, state.name()); } catch (IllegalArgumentException e) { return State.UNKNOWN; } } private  ChannelzProtoUtil();  static final String SO_LINGER; static final String SO_TIMEOUT; static final String TCP_INFO; }### Answer:
@Test public void toState() { for (ConnectivityState connectivityState : ConnectivityState.values()) { assertEquals( connectivityState.name(), ChannelzProtoUtil.toState(connectivityState).getValueDescriptor().getName()); } assertEquals(State.UNKNOWN, ChannelzProtoUtil.toState(null)); }