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