- .findMappingsForSequenceAndOthers(seq1, mappings,
- new Alignment(new SequenceI[] { seq1, seq2 }));
+ .findMappingsForSequenceAndOthers(null, mappings,
+ Arrays.asList(new SequenceI[] { seq1, seq2 }));
+ assertTrue(result.isEmpty());
+
+ result = MappingUtils.findMappingsForSequenceAndOthers(seq1, null,
+ Arrays.asList(new SequenceI[] { seq1, seq2 }));
+ assertTrue(result.isEmpty());
+
+ /*
+ * Seq1 has three mappings, but filter argument will only accept
+ * those to seq2
+ */
+ result = MappingUtils.findMappingsForSequenceAndOthers(
+ seq1,
+ mappings,
+ Arrays.asList(new SequenceI[] { seq1, seq2,
+ seq1.getDatasetSequence() }));
+ assertEquals(2, result.size());