@Test
public void testValidateTopology_basic() throws Exception {

  group1Components.add("component1");
  group1Components.add("component1");
  services.addAll(Arrays.asList("service1", "service2"));
  expect(stack.getComponents("service1")).andReturn(Collections.singleton("component1")).anyTimes();
  expect(stack.getComponents("service2")).andReturn(Collections.singleton("component2")).anyTimes();
  expect(blueprint.getHostGroupsForComponent("component1")).andReturn(Collections.singleton(group1)).anyTimes();
  expect(blueprint.getHostGroupsForComponent("component2")).andReturn(Arrays.asList(group1, group2)).anyTimes();
  replay(blueprint, stack, group1, group2, dependency1);
  BlueprintValidator validator = new BlueprintValidatorImpl(blueprint);
  validator.validateTopology();
}