@Test
public void testPreUpgradeCheckBypassesFailure() throws Exception {

  // This mock class extends CheckHelper and overrides the getPrerequisiteChecks method in order to return
  // a PrerequisiteCheck object whose status is FAIL.
  final CheckHelperMock helper =  new CheckHelperMock();
  List<AbstractCheckDescriptor> updateChecksRegistry = new ArrayList<AbstractCheckDescriptor>();
  PrereqCheckRequest checkRequest = EasyMock.createNiceMock(PrereqCheckRequest.class);
  EasyMock.expect(checkRequest.getClusterName()).andReturn("c1").anyTimes();
  EasyMock.replay(checkRequest);
  final List<PrerequisiteCheck> upgradeChecks = helper.performChecks(checkRequest, updateChecksRegistry);
  Assert.assertEquals(1, upgradeChecks.size());
  Assert.assertEquals(PrereqCheckStatus.BYPASS, upgradeChecks.get(0).getStatus());
}