### Question:
MultisourceBeanLocator implements ConfiguredBeanLocator { @Override public boolean hasConfiguredPropertyValue(String beanName, String propertyName, String value) { return locators.stream() .map(locator -> locator.hasConfiguredPropertyValue(beanName, propertyName, value)) .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 testHasConfiguredPropertyValue_firstLocator() { when(source1.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(true); when(source2.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false); verifyNoMoreInteractions(source2); Assert.assertTrue(multisourceBeanLocator.hasConfiguredPropertyValue("test", "testProp", "val")); }
@Test public void testHasConfiguredPropertyValue_secondLocator() { when(source1.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false); when(source2.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(true); Assert.assertTrue(multisourceBeanLocator.hasConfiguredPropertyValue("test", "testProp", "val")); }
@Test public void testHasConfiguredPropertyValue_noLocator() { when(source1.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false); when(source2.hasConfiguredPropertyValue(eq("test"), eq("testProp"), eq("val"))).thenReturn(false); Assert.assertFalse(multisourceBeanLocator.hasConfiguredPropertyValue("test", "testProp", "val")); }