### Question:
AdvancedPropertyUtils extends PropertyUtils { @Override public Property getProperty(Class<? extends Object> type, String name) throws IntrospectionException { if (name.indexOf('-') > -1) { name = CaseFormat.LOWER_HYPHEN.to(CaseFormat.LOWER_CAMEL, name); } return super.getProperty(type, name); }  @Override Property getProperty(Class<? extends Object> type, String name); @Override void setAllowReadOnlyProperties(boolean allowReadOnlyProperties);  }### Answer:
@Test public void regularPropertyName() throws Exception { Property property = properyUtils.getProperty(TestBean.class, "longPropertyName"); assertThat(property).isNotNull(); assertThat(property.getName()).isEqualTo("longPropertyName"); }
@Test public void lowerHyphenPropertyName() throws Exception { Property property = properyUtils.getProperty(TestBean.class, "long-property-name"); assertThat(property).isNotNull(); assertThat(property.getName()).isEqualTo("longPropertyName"); }
@Test(expected = YAMLException.class) public void illegalPropertyName() throws Exception { properyUtils.getProperty(TestBean.class, "unknown"); }