### Question:
ProviderStatusPresenter { public void clear() { view.clear(); clearItems(); } @Inject  ProviderStatusPresenter(final View view,
                                   final ManagedInstance<RuntimePresenter> runtimePresenterInstance); @PostConstruct void init(); void setupItems(final Collection<RuntimeListItem> response); boolean removeItem(final RuntimeKey runtimeKey); boolean removeItem(final PipelineExecutionTraceKey pipelineExecutionTraceKey); boolean isEmpty(); void clear(); View getView();  }### Answer:
@Test public void testClear() { List<RuntimeListItem> items = mockItems(ITEMS_COUNT); presenter.setupItems(items); presenter.clear(); verify(view, times(2)).clear(); runtimePresenters.forEach(runtimePresenter -> verify(runtimePresenterInstance, times(1)).destroy(runtimePresenter)); verify(runtimePresenterInstance, times(ITEMS_COUNT)).destroy(any()); }