### Question:
AdvancedPropertyUtils extends PropertyUtils { @Override protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess beanAccess) throws IntrospectionException { Set<Property> properties = new TreeSet<>(); Collection<Property> props = getPropertiesMap(type, beanAccess).values(); for (Property property : props) { if (include(property)) { properties.add(property); } } return properties; }  @Override Property getProperty(Class<? extends Object> type, String name); @Override void setAllowReadOnlyProperties(boolean allowReadOnlyProperties);  }### Answer:
@Test public void createPropertySetWithDefaultBeanAccess() throws Exception { Set<Property> properties = properyUtils.createPropertySet(TestBean.class, BeanAccess.DEFAULT); assertThat(properties.size()).isEqualTo(1); assertThat(properties.iterator().next().getName()).isEqualTo("longPropertyName"); }
@Test public void createPropertySetWithFieldBeanAccess() throws Exception { Set<Property> properties = properyUtils.createPropertySet(TestBean.class, BeanAccess.FIELD); assertThat(properties.size()).isEqualTo(2); Iterator<Property> iterator = properties.iterator(); assertThat(iterator.next().getName()).isEqualTo("longPropertyName"); assertThat(iterator.next().getName()).isEqualTo("transientProperty"); }
@Test public void createPropertySetWithPropertyBeanAccess() throws Exception { Set<Property> properties = properyUtils.createPropertySet(TestBean.class, BeanAccess.PROPERTY); assertThat(properties.size()).isEqualTo(1); assertThat(properties.iterator().next().getName()).isEqualTo("longPropertyName"); }