### Question:
MultisourceBeanLocator implements ConfiguredBeanLocator { @Override public <T> boolean loadBeansOfType(Class<T> type, BeanLoaderListener<T> listener) { return locators.stream() .map(locator -> locator.loadBeansOfType(type, listener)) .filter(Boolean::booleanValue) .findFirst().orElse(false); } MultisourceBeanLocator(ConfiguredBeanLocator... locators); @Override List<String> getBeanNamesOfType(Class<?> type); @Override T getBeanOfType(String name, Class<T> type); @Override Collection<? extends T> getBeansOfType(Class<T> type); @Override boolean loadBeansOfType(Class<T> type, BeanLoaderListener<T> listener); @Override boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value); @Override boolean hasBeanOfName(String name);  }### Answer:
@Test public void testLoadBeansOfType() { ConfiguredBeanLocator.BeanLoaderListener listener = mock(ConfiguredBeanLocator.BeanLoaderListener.class); multisourceBeanLocator.loadBeansOfType(Long.class, listener); verify(source1).loadBeansOfType(eq(Long.class), eq(listener)); verify(source2).loadBeansOfType(eq(Long.class), eq(listener)); }