@@ -0,0 +1,2546 @@
+package org.agmip.translators.csv;%0A%0Aimport java.io.File;%0Aimport java.net.URL;%0Aimport java.util.ArrayList;%0Aimport java.util.HashMap;%0A//import java.util.HashMap;%0Aimport java.util.Map;%0Aimport org.agmip.util.MapUtil;%0A%0Aimport org.junit.After;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport static org.junit.Assert.*;%0Aimport org.junit.Ignore;%0A%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class AlnkTest %7B%0A    private static final Logger log = LoggerFactory.getLogger(AlnkTest.class);%0A    private AlnkInput reader;%0A    private AlnkOutput writer;%0A    private URL resource = null;%0A%0A    @Before%0A    public void setup() %7B%0A        reader = new AlnkInput();%0A        writer = new AlnkOutput();%0A    %7D%0A%0A    @Test%0A    public void ACOMTest() %7B%0A        log.info(%22Test for reading link information from ACMO file starts%22);%0A        resource = this.getClass().getResource(%22/ACMO.csv%22);%0A        try %7B%0A            Map links = reader.readFile(resource.getPath());%0A            log.info(%22Translation results for link csv test: %7B%7D%22, links.toString());%0A        %7D catch (Exception ex) %7B%0A            ex.printStackTrace();%0A            assertTrue(false);%0A        %7D%0A        assertTrue(true);%0A    %7D%0A%0A    @Test%0A    public void ALNKTest() %7B%0A        log.info(%22Test for reading link information from ALNK file starts%22);%0A        resource = this.getClass().getResource(%22/Linkage.alnk%22);%0A        try %7B%0A            Map links = reader.readFile(resource.getPath());%0A            writer.writeFile(%22output/Linkage.alnk%22, toACEFormat(links));%0A            log.info(%22Translation results for link csv test: %7B%7D%22, links.toString());%0A            File alnk = writer.getAlnkFile();%0A            alnk.delete();%0A            alnk.getParentFile().delete();%0A        %7D catch (Exception ex) %7B%0A            ex.printStackTrace();%0A            assertTrue(false);%0A        %7D%0A        assertTrue(true);%0A    %7D%0A    %0A    private Map toACEFormat(Map links) %7B%0A        HashMap ret = new HashMap();%0A        ArrayList%3CHashMap%3E arr = new ArrayList();%0A        ret.put(%22experiments%22, arr);%0A        HashMap%3CString, String%3E ovlLinks = MapUtil.getObjectOr(links, %22link_overlay%22, new HashMap());%0A        HashMap%3CString, String%3E stgLinks = MapUtil.getObjectOr(links, %22link_stragty%22, new HashMap());%0A        for (String key : ovlLinks.keySet()) %7B%0A            HashMap m = new HashMap();%0A            m.put(%22exname%22, key.substring(7));%0A            m.put(%22field_overlay%22, ovlLinks.get(key));%0A            m.put(%22seasonal_strategy%22, stgLinks.get(key));%0A            arr.add(m);%0A        %7D%0A        return ret;%0A    %7D%0A%7D

Add test class for *.ALNK file