@Test
public void testMinMedian() {
//TODO - might be better to make this test use a data provider?
final HomRefBlock band = new HomRefBlock(vc, 10, 20, HomoSapiensConstants.DEFAULT_PLOIDY);
final GenotypeBuilder gb = new GenotypeBuilder("NA12878");
gb.alleles(vc.getAlleles());
int pos = vc.getStart();
band.add(pos++, gb.DP(10).GQ(11).PL(new int[]{0,11,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
assertValues(band, 10, 10, 11, 11);
band.add(pos++, gb.DP(11).GQ(10).PL(new int[]{0,10,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
assertValues(band, 10, 11, 10, 11);
band.add(pos++, gb.DP(12).GQ(12).PL(new int[]{0,12,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
assertValues(band, 10, 11, 10, 11);
band.add(pos++, gb.DP(13).GQ(15).PL(new int[]{0,15,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
band.add(pos++, gb.DP(14).GQ(16).PL(new int[]{0,16,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
band.add(pos++, gb.DP(15).GQ(17).PL(new int[]{0,17,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
band.add(pos++, gb.DP(16).GQ(18).PL(new int[]{0,18,100}).make());
Assert.assertEquals(band.getStop(), pos - 1);
assertValues(band, 10, 13, 10, 15);
Assert.assertEquals(band.getSize(), pos - vc.getStart());
Assert.assertTrue(Arrays.equals(band.getMinPLs(), new int[]{0,10,100}));
}