JAL-3253-applet disabling button size setting by applet param. Whatever
[jalview.git] / test / jalview / analysis / AlignmentSorterTest.java
index 3b9be23..090ae1a 100644 (file)
@@ -11,10 +11,10 @@ import jalview.datamodel.SequenceI;
 import java.util.Arrays;
 import java.util.List;
 
-import junit.extensions.PA;
-
 import org.testng.annotations.Test;
 
+import junit.extensions.PA;
+
 public class AlignmentSorterTest
 {
   @Test(groups = "Functional")
@@ -31,7 +31,10 @@ public class AlignmentSorterTest
     /*
      * sort with no score features does nothing
      */
-    PA.setValue(AlignmentSorter.class, "sortByFeatureCriteria", null);
+    AlignmentSorter sorter = (AlignmentSorter) PA
+            .invokeMethod(AlignmentSorter.class, "getInstance()",
+                    new Object[] {});
+    PA.setValue(sorter, "sortByFeatureCriteria", null);
 
     AlignmentSorter.sortByFeature(null, null, 0, al.getWidth(), al,
             AlignmentSorter.FEATURE_SCORE);
@@ -64,7 +67,7 @@ public class AlignmentSorterTest
      * sort by ascending score, no filter on feature type or group
      * NB sort order for the same feature set (none) gets toggled, so descending
      */
-    PA.setValue(AlignmentSorter.class, "sortByFeatureAscending", true);
+    PA.setValue(sorter, "sortByFeatureAscending", true);
     AlignmentSorter.sortByFeature(null, null, 0, al.getWidth(), al,
             AlignmentSorter.FEATURE_SCORE);
     assertSame(al.getSequenceAt(3), seq3); // -0.5