PropertyTreeBuilder implements IPropertyTreeBuilder { @Override public String toString() { return "PropertyTreeBuilder [propertyTree=" + propertyTree + "]"; } private  PropertyTreeBuilder();  PropertyTreeBuilder(ArrayList<Property> properties); @Override LinkedHashMap<String, LinkedHashMap<String, ArrayList<Property>>> getPropertyTree(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void itShouldBuildComponenetPropertyTree(){ PropertyStore propertyStore = new PropertyStore(); ArrayList<Property> inputComponentProperties = propertyStore.getProperties("Input"); String expectedTree ="PropertyTreeBuilder [propertyTree={TEXT_PROPERTIES={TEXT_PROPERTIES.GENERAL=[Property [propertyName=name, propertyRenderer=AAA, propertyGroup=TEXT_PROPERTIES, propertySubGroup=GENERAL, propertyDataType=String, propertyType=USER, propertyListeners=[]], Property [propertyName=path, propertyRenderer=AAA, propertyGroup=TEXT_PROPERTIES, propertySubGroup=GENERAL, propertyDataType=String, propertyType=USER, propertyListeners=[]], Property [propertyName=delimiter, propertyRenderer=AAA, propertyGroup=TEXT_PROPERTIES, propertySubGroup=GENERAL, propertyDataType=String, propertyType=USER, propertyListeners=[]]], TEXT_PROPERTIES.OPTIONAL_PROPERTIES=[Property [propertyName=charset, propertyRenderer=AAA, propertyGroup=TEXT_PROPERTIES, propertySubGroup=OPTIONAL_PROPERTIES, propertyDataType=String, propertyType=USER, propertyListeners=[]], Property [propertyName=batch, propertyRenderer=AAA, propertyGroup=TEXT_PROPERTIES, propertySubGroup=OPTIONAL_PROPERTIES, propertyDataType=String, propertyType=USER, propertyListeners=[]]]}, RADIO_PROPERTIES={RADIO_PROPERTIES.safe=[Property [propertyName=safe, propertyRenderer=AAA, propertyGroup=RADIO_PROPERTIES, propertySubGroup=safe, propertyDataType=boolean, propertyType=USER, propertyListeners=[]]], RADIO_PROPERTIES.header=[Property [propertyName=has_header, propertyRenderer=AAA, propertyGroup=RADIO_PROPERTIES, propertySubGroup=header, propertyDataType=boolean, propertyType=USER, propertyListeners=[]]]}, Schema={Schema.GENERAL=[Property [propertyName=Schema, propertyRenderer=AAA, propertyGroup=Schema, propertySubGroup=GENERAL, propertyDataType=boolean, propertyType=USER, propertyListeners=[]]]}, RUNTIME_PROP={RUNTIME_PROP.GENERAL=[Property [propertyName=RuntimeProps, propertyRenderer=AAA, propertyGroup=RUNTIME_PROP, propertySubGroup=GENERAL, propertyDataType=boolean, propertyType=USER, propertyListeners=[]]]}}]"; PropertyTreeBuilder propertyTreeBuilder = new PropertyTreeBuilder(inputComponentProperties); assertEquals(expectedTree,propertyTreeBuilder.toString()); }