@@ -0,0 +1,1447 @@
+package org.opencb.opencga.storage.hadoop.variant.load;%0A%0Aimport org.junit.Test;%0Aimport org.opencb.biodata.models.variant.Variant;%0Aimport org.opencb.opencga.storage.hadoop.variant.archive.VariantHbaseTransformTask;%0A%0Aimport java.util.*;%0A%0Aimport static org.junit.Assert.*;%0A%0Apublic class VariantHadoopDBWriterTest %7B%0A%0A    @Test%0A    public void testFilterVariantsNotFromThisSlice() %7B%0A        List%3CVariant%3E variants = Arrays.asList(%0A                new Variant(%221:2998:AAAAAAAAAA:T%22),%0A                new Variant(%221%22, 3000, 2999, %22%22, %22T%22),%0A                new Variant(%221%22, 3001, 3000, %22%22, %22T%22));%0A        List%3CVariant%3E filteredVariants = new ArrayList%3C%3E(variants.size());%0A        int chunkSize = 1000;%0A%0A        Map%3CLong, List%3CVariant%3E%3E slices = new TreeMap%3C%3E();%0A        for (Variant variant : variants) %7B%0A            for (long l : VariantHbaseTransformTask.getCoveredSlicePositions(variant.getStart(), variant.getEnd(), chunkSize)) %7B%0A                slices.computeIfAbsent(l, k -%3E new LinkedList%3C%3E()).add(variant);%0A            %7D%0A        %7D%0A%0A        slices.forEach((sliceStart, slice) -%3E %7B%0A            List%3CVariant%3E variantsNotFromThisSlice = VariantHadoopDBWriter.filterVariantsNotFromThisSlice(sliceStart, slice);%0A//            System.out.println(sliceStart + %22 %22 + slice + %22%5Cn        -%3E %22 + variantsNotFromThisSlice);%0A            filteredVariants.addAll(variantsNotFromThisSlice);%0A        %7D);%0A%0A        assertEquals(variants, filteredVariants);%0A    %7D%0A%0A%0A%0A%7D

Add specific test for "filterVariantsNotFromThisSlice" #TASK-1480