@Test
public void testPerformHasRemovedServices() throws Exception {

  final Cluster cluster = Mockito.mock(Cluster.class);
  Mockito.when(cluster.getClusterId()).thenReturn(1L);
  Mockito.when(m_clusters.getCluster("cluster")).thenReturn(cluster);
  Map<String, Service> services = new HashMap<String, Service>();
  services.put("ATLAS", Mockito.mock(Service.class));
  services.put("OLDSERVICE", Mockito.mock(Service.class));
  Mockito.when(cluster.getServices()).thenReturn(services);
  Map<String, String> checkProperties = new HashMap<String, String>();
  checkProperties.put(ServicePresenceCheck.REMOVED_SERVICES_PROPERTY_NAME,"Atlas, OldService");
  checkProperties.put(ServicePresenceCheck.NEW_SERVICES_PROPERTY_NAME,"Atlas2, NewService");
  PrerequisiteCheckConfig prerequisiteCheckConfig = Mockito.mock(PrerequisiteCheckConfig.class);
  Mockito.when(prerequisiteCheckConfig.getCheckProperties(
      m_check.getClass().getName())).thenReturn(checkProperties);
  PrerequisiteCheck check = new PrerequisiteCheck(null, null);
  PrereqCheckRequest request = new PrereqCheckRequest("cluster");
  request.setPrerequisiteCheckConfig(prerequisiteCheckConfig);
  m_check.perform(check, request);
  Assert.assertEquals(PrereqCheckStatus.FAIL, check.getStatus());
}