@Test(enabled = true)
  public void testForceReadgroup() {
    final RecalibrationArgumentCollection forcedRAC = new RecalibrationArgumentCollection();
    forcedRAC.FORCE_READGROUP = "FOO";
    final ReadGroupCovariate forcedCovariate = new ReadGroupCovariate();
    forcedCovariate.initialize(forcedRAC);

    final GATKSAMReadGroupRecord rg = new GATKSAMReadGroupRecord("NOT_FOO");
    runTest(rg, "FOO", forcedCovariate);
  }
 private static void verifyCovariateArray(
     final int[][] values, final String expected, final ReadGroupCovariate covariate) {
   for (int[] value : values) {
     String actual = covariate.formatKey(value[0]);
     Assert.assertEquals(actual, expected);
   }
 }
 private static void runTest(
     final GATKSAMReadGroupRecord rg, final String expected, final ReadGroupCovariate covariate) {
   GATKSAMRecord read = ReadUtils.createRandomRead(10);
   read.setReadGroup(rg);
   ReadCovariates readCovariates = new ReadCovariates(read.getReadLength(), 1);
   covariate.recordValues(read, readCovariates);
   verifyCovariateArray(readCovariates.getMismatchesKeySet(), expected, covariate);
 }
 @BeforeClass
 public void init() {
   RAC = new RecalibrationArgumentCollection();
   covariate = new ReadGroupCovariate();
   covariate.initialize(RAC);
 }