ObjectEnumerationActor { public void enumerateChains(final EnumerationResult result) throws ResolutionException, ChangeValueException { IChainStorage storage = IOC.resolve(Keys.getOrAdd(IChainStorage.class.getCanonicalName())); result.setItems(storage.enumerate()); }  void enumerateChains(final EnumerationResult result); void enumerateReceivers(final EnumerationResult result);  }
@Test public void Should_enumerateChains_enumerateChains() throws Exception { when(chainStorageMock.enumerate()).thenReturn(listMock); new ObjectEnumerationActor().enumerateChains(result); verify(result).setItems(same(listMock)); }