public void testStyle() {
System.out.println("========== testStyle()");
removeExistingStyles();
StyleInfo style = catalog.getFactory().createStyle();
style.setName("style1");
style.setFilename("style1");
catalog.add(style);
style = catalog.getFactory().createStyle();
style.setName("style2");
style.setFilename("style2");
catalog.add(style);
endTransaction();
startNewTransaction();
List<StyleInfo> styles = catalog.getStyles();
assertFalse(styles.isEmpty());
StyleInfo s1 = styles.get(0);
assertTrue(styles.size() == 2);
StyleInfo s2 = styles.get(1);
if ("style2".equals(s1.getName())) {
StyleInfo t = s1;
s1 = s2;
s2 = t;
}
assertEquals("style1", s1.getName());