### Question:
PropertyInfo { public PropertyUpgradeBehavior getPropertyAmbariUpgradeBehavior() { return propertyAmbariUpgradeBehavior; } PropertyInfo(); String getName(); void setName(String name); Set<PropertyDependencyInfo> getUsedByProperties(); String getValue(); void setValue(String value); String getDescription(); void setDescription(String description); String getDisplayName(); void setDisplayName(String displayName); String getFilename(); void setFilename(String filename); Set<PropertyType> getPropertyTypes(); void setPropertyTypes(Set<PropertyType> propertyTypes); PropertyUpgradeBehavior getPropertyAmbariUpgradeBehavior(); void setPropertyAmbariUpgradeBehavior(PropertyUpgradeBehavior propertyAmbariUpgradeBehavior); StackConfigurationResponse convertToResponse(); boolean isDeleted(); void setDeleted(boolean deleted); Map<String, String> getAttributesMap(); ValueAttributesInfo getPropertyValueAttributes(); Set<PropertyDependencyInfo> getDependsOnProperties(); void setPropertyValueAttributes(ValueAttributesInfo propertyValueAttributes); Set<PropertyDependencyInfo> getDependedByProperties(); boolean isRequireInput(); void setRequireInput(boolean requireInput); List<Element> getPropertyAttributes(); void setPropertyAttributes(List<Element> propertyAttributes); Set<RefreshCommand> getSupportedRefreshCommands(); void setSupportedRefreshCommands(Set<RefreshCommand> supportedRefreshCommands); boolean shouldBeConfigured(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); PropertyStackUpgradeBehavior getPropertyStackUpgradeBehavior(); void setPropertyStackUpgradeBehavior(PropertyStackUpgradeBehavior propertyStackUpgradeBehavior);  }### Answer:
@Test public void testUpgradeBehaviorTag() throws JAXBException { String xml = "<property>\n" + " <name>prop_name</name>\n" + " <value>prop_val</value>\n" + " <on-ambari-upgrade add=\"true\" update=\"true\" delete=\"true\"/>\n" + "</property>"; PropertyInfo propertyInfo = propertyInfoFrom(xml); assertTrue(propertyInfo.getPropertyAmbariUpgradeBehavior().isAdd()); assertTrue(propertyInfo.getPropertyAmbariUpgradeBehavior().isUpdate()); assertTrue(propertyInfo.getPropertyAmbariUpgradeBehavior().isDelete()); }
@Test public void testBehaviorWithoutUpgradeTags() throws JAXBException { String xml = "<property>\n" + " <name>prop_name</name>\n" + " <value>prop_val</value>\n" + "</property>"; PropertyInfo propertyInfo = propertyInfoFrom(xml); assertTrue(propertyInfo.getPropertyAmbariUpgradeBehavior().isAdd()); assertFalse(propertyInfo.getPropertyAmbariUpgradeBehavior().isUpdate()); assertFalse(propertyInfo.getPropertyAmbariUpgradeBehavior().isDelete()); }