### Question:
UIElementAnnotationReader { public Stream<PropertyElementDescriptors> getUiElements() { validateNoDuplicatePosition(); return descriptorsByProperty.values().stream() .filter(PropertyElementDescriptors::isNotEmpty) .sorted(Comparator.comparing(PropertyElementDescriptors::getPosition)); } UIElementAnnotationReader(Class<?> annotatedClass); PropertyElementDescriptors findDescriptors(String propertyName); Stream<PropertyElementDescriptors> getUiElements(); @Deprecated static Supplier<?> getModelObjectSupplier(Object pmo, String modelObjectName); @Deprecated static boolean hasModelObjectAnnotation(Object pmo, String modelObjectName);  }### Answer:
@Test public void testGetUiElements_DynamicFields() { UIElementAnnotationReader uiElementAnnotationReader = new UIElementAnnotationReader(DynamicFieldPmo.class); List<PropertyElementDescriptors> uiElements = uiElementAnnotationReader.getUiElements() .collect(Collectors.toList()); assertThat(uiElements.size(), is(1)); PropertyElementDescriptors elementDescriptors = uiElements.get(0); ElementDescriptor fooDescriptor = elementDescriptors .getDescriptor(new DynamicFieldPmo(Type.FOO)); assertThat(fooDescriptor, is(notNullValue())); assertThat(fooDescriptor.getBoundProperty().getModelAttribute(), is("foo")); ElementDescriptor barDescriptor = elementDescriptors .getDescriptor(new DynamicFieldPmo(Type.BAR)); assertThat(barDescriptor, is(notNullValue())); assertThat(barDescriptor.getBoundProperty().getModelAttribute(), is("bar")); }