	@Test
	public void resolve_withBeanConfigurer_providerFailure() {

		// Setup
		BeanReference<Type1> beanReference1Mock = beanReferenceMock();
		BeanReference<Type1> beanReference2Mock = beanReferenceMock();

		BeanConfigurer beanConfigurer1 = context -> {
			context.define( Type1.class, beanReference1Mock );
		};
		BeanConfigurer beanConfigurer2 = context -> {
			context.define( Type1.class, "someName", beanReference2Mock );
		};

		when( serviceResolverMock.loadJavaServices( BeanConfigurer.class ) )
				.thenReturn( Collections.singletonList( beanConfigurer1 ) );
		when( configurationSourceMock.get( EngineSpiSettings.Radicals.BEAN_CONFIGURERS ) )
				.thenReturn( (Optional) Optional.of( Collections.singletonList( beanConfigurer2 ) ) );
		BeanResolver beanResolver =
				new ConfiguredBeanResolver( serviceResolverMock, beanProviderMock, configurationSourceMock );
		verifyNoOtherInteractionsAndReset();

		// resolve(Class)
		RuntimeException providerFailure = new RuntimeException( "internal failure in provider" );
		when( beanProviderMock.forType( Type1.class ) ).thenThrow( providerFailure );
		assertThatThrownBy( () -> beanResolver.resolve( Type1.class ) ).isSameAs( providerFailure );
		verifyNoOtherInteractionsAndReset();

		// resolve(Class, String)
		when( beanProviderMock.forTypeAndName( Type2.class, "someName" ) ).thenThrow( providerFailure );
		assertThatThrownBy( () -> beanResolver.resolve( Type2.class, "someName" ) )
				.isSameAs( providerFailure );
		verifyNoOtherInteractionsAndReset();
	}