NetworkProfilerStage extends StreamingStage implements CodeNavigator.Listener { @NotNull public NetworkStageLegends getLegends() { return myLegends; } NetworkProfilerStage(StudioProfilers profilers); boolean hasUserUsedNetworkSelection(); @NotNull NetworkConnectionsModel getConnectionsModel(); @NotNull RangeSelectionModel getRangeSelectionModel(); @NotNull StackTraceModel getStackTraceModel(); @NotNull HttpDataFetcher getHttpDataFetcher(); boolean setSelectedConnection(@Nullable HttpData data); @Nullable HttpData getSelectedConnection(); @NotNull AspectModel<NetworkProfilerAspect> getAspect(); @Override void enter(); @Override void exit(); @NotNull String getName(); @NotNull DetailedNetworkUsage getDetailedNetworkUsage(); @NotNull AxisComponentModel getTrafficAxis(); @NotNull AxisComponentModel getConnectionsAxis(); @NotNull NetworkStageLegends getLegends(); @NotNull NetworkStageLegends getTooltipLegends(); @NotNull EaseOutModel getInstructionsEaseOutModel(); @NotNull EventMonitor getEventMonitor(); @Override void onNavigated(@NotNull CodeLocation location);  }
@Test public void getLegends() { NetworkProfilerStage.NetworkStageLegends networkLegends = myStage.getLegends(); assertThat(networkLegends.getRxLegend().getName()).isEqualTo("Receiving"); assertThat(networkLegends.getTxLegend().getName()).isEqualTo("Sending"); assertThat(networkLegends.getConnectionLegend().getName()).isEqualTo("Connections"); assertThat(networkLegends.getRxLegend().getValue()).isEqualTo("2 B/s"); assertThat(networkLegends.getTxLegend().getValue()).isEqualTo("1 B/s"); assertThat(networkLegends.getConnectionLegend().getValue()).isEqualTo("4"); assertThat(networkLegends.getLegends()).hasSize(3); }