@Test
public void testBuildCluster() {

  Map<String, String> hostNames = singletonMap("host1", "HEALTHY");
  Map<String, List<String>> map = singletonMap("group1", asList("comp1", "comp2"));
  when(client.doesBlueprintExist("id")).thenReturn(true);
  when(client.getBlueprintMap("id")).thenReturn(map);
  when(context.getFocusValue()).thenReturn("id");
  when(client.getHostNames()).thenReturn(hostNames);
  String result = clusterCommands.buildCluster(new Blueprint("id"));
  verify(client).doesBlueprintExist("id");
  verify(client).getBlueprintMap("id");
  verify(client).getHostGroups("id");
  assertEquals(String.format("%s\n%s", renderSingleMap(hostNames, "HOSTNAME", "STATE"),
    renderMultiValueMap(map, "HOSTGROUP", "COMPONENT")), result);
}