CpuMonitor extends ProfilerMonitor { @Override public void expand() { myProfilers.setStage(new CpuProfilerStage(myProfilers)); } CpuMonitor(@NotNull StudioProfilers profilers); @Override String getName(); @Override TooltipModel buildTooltip(); @Override void exit(); @Override void enter(); @Override void expand(); @NotNull AxisComponentModel getCpuUsageAxis(); @NotNull Legends getLegends(); @NotNull CpuUsage getThisProcessCpuUsage(); @NotNull Legends getTooltipLegends();  }
@Test public void testExpand() { StudioProfilers profilers = new StudioProfilers(new ProfilerClient(myGrpcChannel.getName()), new FakeIdeProfilerServices(), myTimer); CpuMonitor monitor = new CpuMonitor(profilers); assertEquals(profilers.getStage().getClass(), NullMonitorStage.class); myTimer.tick(FakeTimer.ONE_SECOND_IN_NS); monitor.expand(); assertThat(profilers.getStage(), instanceOf(CpuProfilerStage.class)); }