- assertEquals(2,seq.getPrimaryDBRefs().size());
- List<DBRefEntry> res = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(), "A9CKP4");
- assertEquals(1,res.size());
+ assertEquals(2, seq.getPrimaryDBRefs().size());
+ List<DBRefEntry> res = DBRefUtils.searchRefs(seq.getPrimaryDBRefs(),
+ "A9CKP4");
+ assertEquals(1, res.size());
+ assertTrue(res.get(0).isCanonical());
+ res = DBRefUtils.searchRefsForSource(seq.getDBRefs(),
+ DBRefSource.UNIPROT);
+ assertEquals(2, res.size());
+ /*
+ * NB this test fragile - relies on ordering being preserved
+ */