final Class<?> type = microserviceMetaData.getType();
final Set<Annotation> qualifiers = microserviceMetaData.getQualifiers();
final Set<Object> matchingBeansByName = new HashSet<>();
final Set<Object> matchingBeansByType = new HashSet<>();
boolean wasAlternative = false;
<BUG>final BeanManager beanManager = ((BeanManager) context.getProperties().get(BEAN_MANAGER));

Set<Bean<?>> beans = beanManager.getBeans(type, qualifiers.toArray(new Annotation[qualifiers.size()]));

for (Bean<?> bean : beans) {
</BUG>
if (bean.getBeanClass().isAnnotationPresent(Microservice.class) && !(bean instanceof MicroserviceProxyBean)) {

final Class<?> type = microserviceMetaData.getType();
final Set<Annotation> qualifiers = microserviceMetaData.getQualifiers();
final Set<Object> matchingBeansByName = new HashSet<>();
final Set<Object> matchingBeansByType = new HashSet<>();
boolean wasAlternative = false;
final BeanManager beanManager = ((BeanManager) this.context.getProperties().get(BEAN_MANAGER));
final Set<Bean<?>> beans = beanManager.getBeans(type, qualifiers.toArray(new Annotation[qualifiers.size()]));
for (final Bean<?> bean : beans) {
if (bean.getBeanClass().isAnnotationPresent(Microservice.class) && !(bean instanceof MicroserviceProxyBean)) {
