### Question:
BackendProviderSet extends AbstractSet<TraceeBackendProvider> { @Override public Iterator<TraceeBackendProvider> iterator() { final Collection<TraceeBackendProvider> strongRefList = createStrongView(values); determineValidity(strongRefList); if (valid) { return strongRefList.iterator(); } return Collections.<TraceeBackendProvider>emptyList().iterator(); } BackendProviderSet(Set<TraceeBackendProvider> elements); @Override Iterator<TraceeBackendProvider> iterator(); @Override int size();  }### Answer:
@Test public void shouldReturnEmptyIteratorIfOneElementWasDetached() throws Exception { final BackendProviderSet traceeBackendProviders = buildProviderSetWithOneDetachedProvider(); assertThat(traceeBackendProviders.iterator().hasNext(), equalTo(false)); }