@Test
public void testPreUpgradeCheck() throws Exception {

  final CheckHelper helper = new CheckHelper();
  List<AbstractCheckDescriptor> updateChecksRegistry = new ArrayList<AbstractCheckDescriptor>();
  AbstractCheckDescriptor descriptor = EasyMock.createNiceMock(AbstractCheckDescriptor.class);
  descriptor.perform(EasyMock.<PrerequisiteCheck> anyObject(), EasyMock.<PrereqCheckRequest> anyObject());
  EasyMock.expectLastCall().times(1);
  EasyMock.expect(descriptor.isApplicable(EasyMock.<PrereqCheckRequest> anyObject())).andReturn(true);
  EasyMock.replay(descriptor);
  updateChecksRegistry.add(descriptor);
  helper.performChecks(new PrereqCheckRequest("cluster"), updateChecksRegistry);
  EasyMock.verify(descriptor);
}