NetworkProfiler extends StudioProfiler { @Override public void stopProfiling(Common.Session session) { myProfilers.getClient().getNetworkClient().stopMonitoringApp(NetworkStopRequest.newBuilder().setSession(session).build()); } NetworkProfiler(@NotNull StudioProfilers profilers); @Override ProfilerMonitor newMonitor(); @Override void startProfiling(Common.Session session); @Override void stopProfiling(Common.Session session);  }
@Test public void stopMonitoring() { myProfiler.stopProfiling(SESSION_DATA); assertEquals(SESSION_DATA, myService.getSession()); }