JAL-4090 JAL-1551 spotlessApply
[jalview.git] / test / jalview / datamodel / SequenceTest.java
index 7bbb9f3..948a5fb 100644 (file)
@@ -1052,37 +1052,41 @@ public class SequenceTest
     assertEquals("ABCDEF",
             derived.getDatasetSequence().getSequenceAsString());
   }
-  
+
   /**
    * test that creating a copy of an existing sequence with dataset sequence and
    * associated contact matrix yields annotation associated with the same
    * contact matrix in the copy
    */
-  @Test(groups= {"Functional"})
+  @Test(groups = { "Functional" })
   public void testCopyPasteStyleDerivesequence_withcontactMatrixAnn()
   {
-    SequenceI seq1=new Sequence("seq1","ACDACDACD");
+    SequenceI seq1 = new Sequence("seq1", "ACDACDACD");
     seq1.createDatasetSequence();
     ContactMatrixI cm = new SeqDistanceContactMatrix(seq1.getLength());
-    // addContactList needs to return annotation addable to the sequence reference it was called from
+    // addContactList needs to return annotation addable to the sequence
+    // reference it was called from
     AlignmentAnnotation aann = seq1.addContactList(cm);
-    assertTrue(aann.sequenceRef==seq1);
-    assertEquals(1,seq1.getAnnotation().length);
+    assertTrue(aann.sequenceRef == seq1);
+    assertEquals(1, seq1.getAnnotation().length);
     assertNotNull(seq1.getContactListFor(seq1.getAnnotation()[0], 1));
-    
-    SequenceI seq_derived=seq1.deriveSequence();
-    assertEquals(1,seq_derived.getAnnotation().length);
-    assertTrue(cm==seq_derived.getContactMatrixFor(seq_derived.getAnnotation()[0]));
-    assertNotNull(seq_derived.getContactListFor(seq_derived.getAnnotation()[0], 1));
-    
+
+    SequenceI seq_derived = seq1.deriveSequence();
+    assertEquals(1, seq_derived.getAnnotation().length);
+    assertTrue(cm == seq_derived
+            .getContactMatrixFor(seq_derived.getAnnotation()[0]));
+    assertNotNull(seq_derived
+            .getContactListFor(seq_derived.getAnnotation()[0], 1));
+
     // copy paste actually uses the copy constructor .. so
-    
-    SequenceI seq_copied=new Sequence((Sequence)seq_derived);
-    assertEquals(1,seq_copied.getAnnotation().length);
-    assertTrue(cm==seq_copied.getContactMatrixFor(seq_copied.getAnnotation()[0]));
-    assertNotNull(seq_copied.getContactListFor(seq_copied.getAnnotation()[0], 1));
-    
-    
+
+    SequenceI seq_copied = new Sequence((Sequence) seq_derived);
+    assertEquals(1, seq_copied.getAnnotation().length);
+    assertTrue(cm == seq_copied
+            .getContactMatrixFor(seq_copied.getAnnotation()[0]));
+    assertNotNull(
+            seq_copied.getContactListFor(seq_copied.getAnnotation()[0], 1));
+
   }
 
   @Test(groups = { "Functional" })
@@ -2319,12 +2323,12 @@ public class SequenceTest
     origSeq.addDBRef(new DBRefEntry("UNIPROT", "0", "Q12345", null, true));
 
     toSeq.transferAnnotation(origSeq, null);
-    assertEquals("DESCRIPTION",toSeq.getDescription());
+    assertEquals("DESCRIPTION", toSeq.getDescription());
     toSeq = new Sequence("MYSEQ", "THISISASEQ");
     toSeq.setDescription("unchanged");
     toSeq.transferAnnotation(origSeq, null);
-    assertEquals("unchanged",toSeq.getDescription());
-    
+    assertEquals("unchanged", toSeq.getDescription());
+
     assertTrue(toSeq.getDBRefs().size() == 1);
 
     assertTrue(toSeq.getDBRefs().get(0).isCanonical());