### Question:
PropertyUtils { public static Set<String> getPropertyNames(Class<?> beanClass) { PropertyDescriptor[] propertyDescriptorArray = getPropertyDescriptors0(beanClass); Set<String> propertyNames = Sets.newHashSet(); for (PropertyDescriptor propertyDescriptor : propertyDescriptorArray) { if (EXCLUDED_PROPERTY_NAMES.contains(propertyDescriptor.getName())) { continue; } propertyNames.add(propertyDescriptor.getName()); } return propertyNames; } private  PropertyUtils(); static Set<String> getPropertyNames(Class<?> beanClass); static Set<PropertyDescriptor> getPropertyDescriptors(Class<?> beanClass); static String shortDescription(Class<?> beanClass, String proeprtyName);  }### Answer:
@Test public void whenGetPropertyNames_thenReturnExpectedPropertyNames() { Set<String> propertyNames = PropertyUtils.getPropertyNames(Bean.class); assertEquals(Sets.newHashSet(Bean.PROPERTY1, Bean.PROPERTY2), propertyNames); }
@Test public void whenGetPropertyNames_thenReturnZero() { Set<String> propertyNames = PropertyUtils.getPropertyNames(MalformedBean.class); assertThat(propertyNames.size(), is(0)); }