openLibrary(LibC1);
openLibrary("LibraryCIncludeTheme_1.xml");
	  public void testThemeSearchAlgorithm() throws Exception	  {		  //report design has four styles:		  //custom styles: mytable, mylabel		  //selector styles: table, label		  openDesign("ThemeTest2.xml");	       table = (TableHandle) designHandle.findElement("mytable");	       label = (LabelHandle) designHandle.findElement("mylabel");	       SharedStyleHandle RCS1 = designHandle.findStyle("mytable");	       SharedStyleHandle RCS2 = designHandle.findStyle("mylabel");	       SharedStyleHandle RSS1 = designHandle.findStyle("table");	       SharedStyleHandle RSS2 = designHandle.findStyle("label");	       assertNotNull(table);	       assertNotNull(label);	       assertNotNull(RCS1);	       assertNotNull(RCS2);	       assertNotNull(RSS1);	       assertNotNull(RSS2);	       	       //LibC has a theme with four styles:			  //custom styles: mytable, mylabel			  //selector styles: table, label		       openLibrary(LibC);		       libraryHandle.saveAs(LibC1);		       StyleHandle LCS1 = libraryHandle.findTheme("theme1").findStyle("mytable");		       StyleHandle LCS2 = libraryHandle.findTheme("theme1").findStyle("mylabel");		       StyleHandle LSS1 = libraryHandle.findTheme("theme1").findStyle("table");		       StyleHandle LSS2 = libraryHandle.findTheme("theme1").findStyle("label");		       assertNotNull(LCS1);		       assertNotNull(LCS2);		       assertNotNull(LSS1);		       assertNotNull(LSS2);	       		   designHandle.includeLibrary(LibC1, "LibC");			           		   //Specify theme1 for report design		   designHandle.setThemeName("LibC.theme1");		   table.setStyleName("mytable");		   label.setStyleName("mylabel");		   assertEquals("large",table.getStringProperty(Style.FONT_SIZE_PROP));		   assertEquals("#0000FF",label.getStringProperty(Style.BACKGROUND_COLOR_PROP));		       		   //drop custom styles in report design		   designHandle.getStyles().drop(RCS1);		   designHandle.getStyles().drop(RCS2);		   assertEquals("100%",table.getStringProperty(Style.FONT_SIZE_PROP));		   assertEquals("aqua",label.getStringProperty(Style.BACKGROUND_COLOR_PROP));		   designHandle.saveAs(PLUGIN_PATH + getFullQualifiedClassName() + INPUT_FOLDER+"ThemeTest2_1.xml");		       	       //drop custom styles in library	       libraryHandle.findTheme("theme1").getStyles().drop(LCS1);	       libraryHandle.findTheme("theme1").getStyles().drop(LCS2);	       libraryHandle.save();	       openDesign("ThemeTest2_1.xml");	       assertEquals("10pt",designHandle.findElement("mytable").getStringProperty(Style.FONT_SIZE_PROP));	       assertEquals("red",designHandle.findElement("mylabel").getStringProperty(Style.BACKGROUND_COLOR_PROP));	       	       //drop selector styles in report design	       designHandle.findStyle("table").drop();	       designHandle.findStyle("label").drop();	       assertEquals("small",designHandle.findElement("mytable").getStringProperty(Style.FONT_SIZE_PROP));	       assertEquals("#808080",designHandle.findElement("mylabel").getStringProperty(Style.BACKGROUND_COLOR_PROP));	       designHandle.save();	       	       //drop selector styles in library	       openLibrary(LibC1);	       libraryHandle.findTheme("theme1").findStyle("table").drop();	       libraryHandle.findTheme("theme1").findStyle("label").drop();	       libraryHandle.save();	       openDesign("ThemeTest2_1.xml");	       assertEquals("medium",designHandle.findElement("mytable").getStringProperty(Style.FONT_SIZE_PROP));	       assertNull(designHandle.findElement("mylabel").getStringProperty(Style.BACKGROUND_COLOR_PROP));	       	       //drop theme in library	       openLibrary(LibC1);	       libraryHandle.findTheme("theme1").drop();	       assertNull(libraryHandle.findTheme("LibC1.theme1"));		  	  }