@Test
public void testAddModules() throws Exception {
ArrayList<Module> firstLevelDatas = new ArrayList<Module>();
firstLevelDatas.add( new Module( "defaultPackage" ) );
Module mortgageConfigData = new Module( "mortgage" );
ArrayList<Module> secondLevelDatas = new ArrayList<Module>();
secondLevelDatas.add( new Module( "sub1" ) );
Module thirdLevelConfigDataParent = new Module( "sub2" );
secondLevelDatas.add( thirdLevelConfigDataParent );
ArrayList<Module> thirdLevelDatas = new ArrayList<Module>();
thirdLevelDatas.add( new Module( "level3" ) );
thirdLevelConfigDataParent.setSubModules( thirdLevelDatas.toArray( new Module[thirdLevelDatas.size()] ) );
secondLevelDatas.add( new Module( "sub3" ) );
mortgageConfigData.setSubModules( secondLevelDatas.toArray( new Module[secondLevelDatas.size()] ) );
firstLevelDatas.add( mortgageConfigData );
packageConfigDatas = firstLevelDatas.toArray( new Module[firstLevelDatas.size()] );