@@ -0,0 +1,2377 @@
+/*%0A * Copyright (c) 2014. Real Time Genomics Limited.%0A *%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are%0A * met:%0A *%0A * 1. Redistributions of source code must retain the above copyright%0A *    notice, this list of conditions and the following disclaimer.%0A *%0A * 2. Redistributions in binary form must reproduce the above copyright%0A *    notice, this list of conditions and the following disclaimer in the%0A *    documentation and/or other materials provided with the%0A *    distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A * %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT%0A * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage com.rtg.reader;%0A%0Aimport java.io.IOException;%0A%0Aimport com.rtg.AbstractTest;%0Aimport com.rtg.util.io.TestDirectory;%0A%0Aimport htsjdk.samtools.SAMSequenceRecord;%0A%0A/**%0A */%0Apublic class SequencesReaderReferenceSourceTest extends AbstractTest %7B%0A%0A  public void test() throws IOException %7B%0A    try (TestDirectory templ = new TestDirectory()) %7B%0A      ReaderTestUtils.getDNADir(%22%3Eseq1%5Cnactg%5Cn%3Eseq2%5Cngtca%22, templ);%0A      final SequencesReader r = SequencesReaderFactory.createDefaultSequencesReader(templ);%0A      final SequencesReaderReferenceSource sr = r.referenceSource();%0A      assertNull(sr.getReferenceBases(new SAMSequenceRecord(%22foo%22, 1), false));%0A      final byte%5B%5D s1 = sr.getReferenceBases(new SAMSequenceRecord(%22seq1%22, 1), false);%0A      assertNotNull(s1);%0A      assertEquals(%22ACTG%22, new String(s1));%0A      final byte%5B%5D s2 = sr.getReferenceBases(new SAMSequenceRecord(%22seq2%22, 1), false);%0A      assertNotNull(s2);%0A      assertEquals(%22GTCA%22, new String(s2));%0A    %7D%0A  %7D%0A%7D%0A

Add unit test