JAL-3253 jalview.bin.Instance streamlining
[jalview.git] / test / jalview / ws / seqfetcher / DbRefFetcherTest.java
index a7e5806..f752235 100644 (file)
@@ -85,11 +85,11 @@ public class DbRefFetcherTest
   @Test(groups = { "Functional" })
   public void testStandardProtDbs()
   {
-    List<String> defdb = new ArrayList<String>();
+    List<String> defdb = new ArrayList<>();
     defdb.addAll(Arrays.asList(DBRefSource.PROTEINDBS));
     defdb.add(DBRefSource.PDB);
-    List<DbSourceProxy> srces = new ArrayList<DbSourceProxy>();
-    SequenceFetcher sfetcher = new SequenceFetcher();
+    List<DbSourceProxy> srces = new ArrayList<>();
+    SequenceFetcher sfetcher = SequenceFetcher.getInstance();
     boolean pdbFound = false;
 
     for (String ddb : defdb)
@@ -135,7 +135,7 @@ public class DbRefFetcherTest
   public void testEmblUniprotProductRecovery() throws Exception
   {
     String retrievalId = "V00488";
-    DbSourceProxy embl = new SequenceFetcher().getSourceProxy(
+    DbSourceProxy embl = SequenceFetcher.getInstance().getSourceProxy(
             DBRefSource.EMBL).get(0);
     assertNotNull("Couldn't find the EMBL retrieval client", embl);
     verifyProteinNucleotideXref(retrievalId, embl);
@@ -151,7 +151,8 @@ public class DbRefFetcherTest
   public void testEmblCDSUniprotProductRecovery() throws Exception
   {
     String retrievalId = "AAH29712";
-    DbSourceProxy embl = new SequenceFetcher().getSourceProxy(
+    DbSourceProxy embl = SequenceFetcher.getInstance()
+            .getSourceProxy(
             DBRefSource.EMBLCDS).get(0);
     assertNotNull("Couldn't find the EMBL retrieval client", embl);
     verifyProteinNucleotideXref(retrievalId, embl);