// BridgeDb,
// An abstraction layer for identifier mapping services, both local and online.
//
// Copyright 2006-2009  BridgeDb developers
// Copyright 2012-2013  Christian Y. A. Brenninkmeijer
// Copyright 2012-2013  OpenPhacts
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
package org.bridgedb.mysql;

import java.util.Set;
import org.apache.log4j.Logger;
import org.bridgedb.DataSource;
import org.bridgedb.IDMapperException;
import org.bridgedb.Xref;
import org.bridgedb.pairs.SyscodeBasedCodeMapper;
import org.bridgedb.sql.SQLIdMapper;
import org.bridgedb.sql.SQLListener;
import org.bridgedb.sql.TestSqlFactory;
import org.bridgedb.utils.BridgeDBException;
import org.bridgedb.utils.ConfigReader;
import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;

/**
 * Loads the test data in and then runs the IDmapper and IDCapabiliies tests
 *
 * @author Christian
 */
//@Ignore 
public class MappingListenerTest extends org.bridgedb.mapping.MappingListenerTest {
    
    static final Logger logger = Logger.getLogger(MappingListenerTest.class);
    static SQLIdMapper sqlIdMapper;
    
    @BeforeClass
    public static void setupIDMapper() throws BridgeDBException{
        connectionOk = false;
        TestSqlFactory.checkSQLAccess();
        ConfigReader.useTest();
        listener = new SQLListener(true);
        loadData();
        sqlIdMapper = new SQLIdMapper(false, new SyscodeBasedCodeMapper());
        idMapper  = sqlIdMapper;
        connectionOk = true;
        capabilities = idMapper.getCapabilities(); 
        logger.info("MySQL Setup successfull");
    }
    
    @Test
    public void testMapIDOneToOne() throws IDMapperException{
        report("MapIDOneToOne");
        Set<Xref> results = sqlIdMapper.mapID(map1xref1, DataSource2);
        assertTrue(results.contains(map1xref2));
        assertFalse(results.contains(map1xref3));
        assertFalse(results.contains(map2xref1));
        assertFalse(results.contains(map2xref2));
        assertFalse(results.contains(map2xref2));
    }
   
}

@@ -1,10 +1,14 @@
-//
+%0A/*%0A *
  BridgeD
@@ -10,18 +10,18 @@
 idgeDb,%0A
-//
+ *
  An abst
@@ -90,21 +90,18 @@
 online.%0A
-//%0A//
+ *
  Copyrig
@@ -106,14 +106,20 @@
 ight
+ (c)
  2006
--
+ - 
 2009
@@ -129,17 +129,17 @@
 ridgeDb 
-d
+D
 eveloper
@@ -140,18 +140,18 @@
 elopers%0A
-//
+ *
  Copyrig
@@ -148,30 +148,36 @@
  * Copyright
+ (c)
  2012
--
+ - 
 2013  Christ
@@ -201,18 +201,18 @@
 kmeijer%0A
-//
+ *
  Copyrig
@@ -217,14 +217,20 @@
 ight
+ (c)
  2012
--
+ - 
 2013
@@ -242,21 +242,21 @@
 nPhacts%0A
-//%0A//
+ *%0A *
  License
@@ -312,18 +312,18 @@
 ense%22);%0A
-//
+ *
  you may
@@ -380,18 +380,18 @@
 icense.%0A
-//
+ *
  You may
@@ -422,22 +422,16 @@
 cense at
-%0A//%0A//
  http://
@@ -470,13 +470,13 @@
 2.0%0A
-//%0A//
+ *%0A *
  Unl
@@ -539,19 +539,16 @@
 software
-%0A//
  distrib
@@ -606,18 +606,18 @@
  BASIS,%0A
-//
+ *
  WITHOUT
@@ -682,18 +682,18 @@
 mplied.%0A
-//
+ *
  See the
@@ -752,19 +752,16 @@
 ions and
-%0A//
  limitat
@@ -788,11 +788,13 @@
 se.%0A
-/
+ *
 /%0A
+%0A
 pack
@@ -876,40 +876,9 @@
 er;%0A
-import org.bridgedb.DataSource;
 %0A
+
 impo
@@ -1191,49 +1191,92 @@
 er;%0A
+%0A
 import 
-static org.junit.Assert.*;
+org.junit.jupiter.api.BeforeAll;%0Aimport org.junit.jupiter.api.Test;%0A
 %0Aimport 
 org.
@@ -1263,32 +1263,39 @@
 i.Test;%0A%0Aimport 
+static 
 org.junit.Before
@@ -1288,27 +1288,50 @@
 g.junit.
-BeforeClass
+jupiter.api.Assertions.assertFalse
 ;%0Aimport
@@ -1323,32 +1323,39 @@
 rtFalse;%0Aimport 
+static 
 org.junit.Test;%0A
@@ -1348,20 +1348,49 @@
 g.junit.
-Test
+jupiter.api.Assertions.assertTrue
 ;%0A%0A/**%0A 
@@ -1727,13 +1727,11 @@
 fore
-Class
+All
 %0A   

Update MappingListenerTest.java