@@ -0,0 +1,1821 @@
+package org.seqdoop.hadoop_bam;%0A%0Aimport hbparquet.hadoop.util.ContextUtil;%0Aimport java.util.List;%0Aimport org.apache.hadoop.conf.Configuration;%0Aimport org.apache.hadoop.io.Text;%0Aimport org.apache.hadoop.mapreduce.InputSplit;%0Aimport org.apache.hadoop.mapreduce.JobContext;%0Aimport org.apache.hadoop.mapreduce.RecordReader;%0Aimport org.apache.hadoop.mapreduce.TaskAttemptContext;%0Aimport org.apache.hadoop.mapreduce.TaskAttemptID;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static org.mockito.Mockito.mock;%0A%0Apublic class TestFastaInputFormat %7B%0A  private String input;%0A  private TaskAttemptContext taskAttemptContext;%0A  private JobContext jobContext;%0A%0A  @Before%0A  public void setup() throws Exception %7B%0A    Configuration conf = new Configuration();%0A    input = ClassLoader.getSystemClassLoader().getResource(%22auxf.fa%22).getFile();%0A    conf.set(%22mapred.input.dir%22, %22file://%22 + input);%0A%0A    taskAttemptContext = ContextUtil.newTaskAttemptContext(conf, mock(TaskAttemptID.class));%0A    jobContext = ContextUtil.newJobContext(conf, taskAttemptContext.getJobID());%0A  %7D%0A%0A  @Test%0A  public void testReader() throws Exception %7B%0A    FastaInputFormat inputFormat = new FastaInputFormat();%0A    List%3CInputSplit%3E splits = inputFormat.getSplits(jobContext);%0A    assertEquals(1, splits.size());%0A    RecordReader%3CText, ReferenceFragment%3E reader = inputFormat%0A        .createRecordReader(splits.get(0), taskAttemptContext);%0A    reader.initialize(splits.get(0), taskAttemptContext);%0A%0A    assertTrue(reader.nextKeyValue());%0A    assertEquals(reader.getCurrentKey(), new Text(%22Sheila1%22));%0A    ReferenceFragment fragment = reader.getCurrentValue();%0A    assertEquals(fragment.getSequence(), new Text(%22GCTAGCTCAGAAAAAAAAAA%22));%0A    reader.close();%0A  %7D%0A%0A%7D%0A

Add TestFastaInputFormat.