added initial test case and small code reformatting in the ExpandComponent