Rearrangement { public static List<VariantHotspot> rearrangeInsert(int position, int indelLength, int readIndex, byte[] readBases, int refIndex, byte[] refBases) { final List<VariantHotspot> left = moveLeft(false, position, indelLength, readIndex, readBases, refIndex, refBases); if (!left.isEmpty()) { return left; } return moveRight(false, position, indelLength, readIndex, readBases, refIndex, refBases); }  static List<VariantHotspot> rearrangeInsert(int position, int indelLength, int readIndex, byte[] readBases, int refIndex,
            byte[] refBases); static List<VariantHotspot> rearrangeDelete(int position, int indelLength, int readIndex, byte[] readBases, int refIndex,
            byte[] refBases); @NotNull static List<VariantHotspot> moveLeft(boolean delete, int position, int indelLength, int readIndex, byte[] readBases,
            int refIndex, byte[] refBases); @NotNull static List<VariantHotspot> moveRight(boolean delete, int position, int indelLength, int readIndex, byte[] readBases,
            int refIndex, byte[] refBases);  }
@Test public void testLongIndelRearrangedMNVTooLong() { final String ref1 = ("CCT TATGGTTT").replace(" ", ""); final String alt1 = ("CCTCCCCCCTATGGTTT"); final List<VariantHotspot> victims = Rearrangement.rearrangeInsert(1002, 7, 2, alt1.getBytes(), 2, ref1.getBytes()); assertEquals(0, victims.size()); }
@Test public void testShortIndel() { final String ref1 = ("CCT TATGGTTT").replace(" ", ""); final String alt1 = ("CCTCCTCTGGTTT"); final List<VariantHotspot> victims = Rearrangement.rearrangeInsert(1002, 3, 2, alt1.getBytes(), 2, ref1.getBytes()); assertEquals(2, victims.size()); assertVariant(1003, "TA", "CC", victims.get(0)); assertVariant(1005, "T", "TCT", victims.get(1)); }