/**
* Method to test resource classes saving of parameters functionality
*/
public void testSaveResources(){
EditorAdvancedThemeIcons advIcon = new EditorAdvancedThemeIcons();
EditorSimpleThemeIcons simpleIcon = new EditorSimpleThemeIcons();
Skin skin = SkinFactory.getInstance().getSkin(facesContext);
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(facesContext);
String additionalBackgroundColor = getSkinParameter(skin, defaultSkin, facesContext, EditorIcons.ADDITIONAL_BACKGROUND_COLOR);
String selectControlColor = getSkinParameter(skin, defaultSkin, facesContext,
EditorIcons.SELECT_CONTROL_COLOR);
String panelBorderColor = getSkinParameter(skin, defaultSkin, facesContext, EditorIcons.PANEL_BORDER_COLOR);
String generalTextColor = getSkinParameter(skin, defaultSkin, facesContext, EditorIcons.GENERAL_TEXT_COLOR);
assertNotNull(additionalBackgroundColor);
assertNotNull(selectControlColor);
assertNotNull(panelBorderColor);
assertNotNull(generalTextColor);
Color color1 = HtmlColor.decode(additionalBackgroundColor);
Color color2 = HtmlColor.decode(selectControlColor);
Color color3 = HtmlColor.decode(panelBorderColor);
Color color4 = HtmlColor.decode(generalTextColor);
byte [] data = (byte []) advIcon.getDataToStore(facesContext, null);
assertNotNull(data);
Object [] results = (Object [])advIcon.deserializeData(data);
assertNotNull(results);
assertEquals(color1, results[0]);
assertEquals(color2, results[1]);
assertEquals(color3, results[2]);
assertEquals(color4, results[3]);
data = (byte []) simpleIcon.getDataToStore(facesContext, null);
assertNotNull(data);
results = (Object [])simpleIcon.deserializeData(data);
assertNotNull(results);
assertEquals(color1, results[0]);
assertEquals(color2, results[1]);
assertEquals(color3, results[2]);
assertEquals(color4, results[3]);
BufferedImage image = advIcon.paintFirstTriangleBlock(results, true);
assertNotNull(image);
image = advIcon.paintMainBlock(results, true, true);
assertNotNull(image);
image = advIcon.paintSecondTriangleBlock(results, true);
assertNotNull(image);
image = advIcon.paintSeparatorBlock(results);
assertNotNull(image);
}