WorkBenchManager { public void storeDefaultLayout() { for (String name : myWorkBenches.keySet()) { Optional<WorkBench> workbench = myWorkBenches.get(name).stream().findFirst(); if (workbench.isPresent()) { workbench.get().storeDefaultLayout(); 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 testStoreDefaultLayout() { myManager.storeDefaultLayout(); verify(myWorkBench1).storeDefaultLayout(); verify(myWorkBench4).storeDefaultLayout(); }