+ Map<String, String> newPreferences = Cache.getProperties(
+ AutoAnnotation.OCCUPANCY.preferenceKey,
+ AutoAnnotation.CONSERVATION.preferenceKey,
+ AutoAnnotation.QUALITY.preferenceKey,
+ AutoAnnotation.CONSENSUS.preferenceKey);
+ assertEquals(originalPreferences, newPreferences);
+ assertNull(Cache.getProperty(AutoAnnotation.QUALITY.preferenceKey));
+
+ /*
+ * make a new view, reorder its annotations, and delete and hide
+ * a different annotation in each of the two views
+ */
+ newPanel = af.newView("new", true);
+ af.getViewport().setViewName("Original");
+
+ /*
+ * just for interest - new view has the same manual annotation objects,
+ * but new auto-calculated annotations
+ */
+ AlignmentI newAlignment = newPanel.getAlignment();
+ newAnns = newAlignment.getAlignmentAnnotation();
+ assertNotSame(anns[0], newAnns[0]);
+ assertSame(anns[1], newAnns[1]);
+ assertNotSame(anns[2], newAnns[2]);
+ assertSame(anns[3], newAnns[3]);
+
+ alignment.deleteAnnotation(anns[2]); // delete Conservation view 1
+ anns[1].visible = false; // hide 'hello' view 1
+
+ tmp = newAnns[0];
+ newAnns[0] = newAnns[3]; // 'world' moved to top of new view
+ newAnns[3] = tmp; // then hello, Conservation, Occupancy
+ newAnns[0].visible = false; // hide 'world' in new view
+ newAnns[3].graphHeight = 99; // set height of Occupancy
+ newAlignment.deleteAnnotation(newAnns[1]); // delete 'hello' in new view