WorkBenchManager { public void updateOtherWorkBenches(@NotNull WorkBench workBench) { Collection<WorkBench> workBenches = myWorkBenches.get(workBench.getName()); workBenches.stream().filter(bench -> bench != workBench).forEach(WorkBench::updateModel); } 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 testUpdateOtherWorkBenches() { myManager.updateOtherWorkBenches(myWorkBench2); verify(myWorkBench1).updateModel(); verify(myWorkBench2, never()).updateModel(); verify(myWorkBench3).updateModel(); verify(myWorkBench4, never()).updateModel(); verify(myWorkBench5, never()).updateModel(); }