NetworkMonitor extends ProfilerMonitor { public NetworkLegends getLegends() { return myLegends; } NetworkMonitor(@NotNull StudioProfilers profilers); @Override @NotNull String getName(); @Override TooltipModel buildTooltip(); @Override void exit(); @Override void enter(); @Override void expand(); AxisComponentModel getTrafficAxis(); NetworkUsage getNetworkUsage(); NetworkLegends getLegends(); NetworkLegends getTooltipLegends();  }
@Test public void getLegends() { NetworkMonitor.NetworkLegends networkLegends = myMonitor.getLegends(); assertEquals("Receiving", networkLegends.getRxLegend().getName()); assertEquals("2 B/s", networkLegends.getRxLegend().getValue()); assertEquals("Sending", networkLegends.getTxLegend().getName()); assertEquals("1 B/s", networkLegends.getTxLegend().getValue()); List<Legend> legends = networkLegends.getLegends(); assertEquals(2, legends.size()); assertEquals("Sending", legends.get(0).getName()); assertEquals("Receiving", legends.get(1).getName()); }