WorkBenchManager { public void restoreDefaultLayout() { for (String name : myWorkBenches.keySet()) { Optional<WorkBench> workbench = myWorkBenches.get(name).stream().findFirst(); if (workbench.isPresent()) { workbench.get().restoreDefaultLayout(); updateOtherWorkBenches(workbench.get()); } } } WorkBenchManager(); static WorkBenchManager getInstance(); void register(@NotNull WorkBench workBench); void unregister(@NotNull WorkBench workBench); void storeDefaultLayout(); void restoreDefaultLayout(); void updateOtherWorkBenches(@NotNull WorkBench workBench);  }
@Test public void testRestoreDefaultLayout() { myManager.restoreDefaultLayout(); verify(myWorkBench1).restoreDefaultLayout(); verify(myWorkBench2).updateModel(); verify(myWorkBench3).updateModel(); verify(myWorkBench4).restoreDefaultLayout(); verify(myWorkBench5).updateModel(); }