### Question:
ClusterDefinition { public Set<String> getServices() { return services; } ClusterDefinition(StateProvider stateProvider,
                           ClusterDefinitionProvider definitionProvider,
                           HostInfoProvider hostInfoProvider); Integer getMajorStackVersion(); Integer getMinorStackVersion(); String getClusterName(); String getVersionId(); Set<String> getServices(); Set<String> getHosts(); HostInfoProvider getHostInfoProvider(); Set<String> getComponents(String service); Set<String> getHostComponents(String service, String host); String getHostState(String hostName); String getServiceState(String serviceName); int setServiceState(String serviceName, String state); String getComponentState(String serviceName, String componentName); int setComponentState(String serviceName, String componentName, String state); String getHostComponentState(String hostName, String componentName); int setHostComponentState(String hostName, String componentName, String state); StateProvider.Process getProcess(Integer id); Set<Resource> getRequestResources(); Set<Resource> getTaskResources();  }### Answer:
@Test public void testGetServices() throws Exception { ClusterDefinition clusterDefinition = new ClusterDefinition(new TestStateProvider(), new TestClusterDefinitionProvider(), new TestHostInfoProvider()); Set<String> services = clusterDefinition.getServices(); Assert.assertTrue(services.contains("HDFS")); Assert.assertTrue(services.contains("FLUME")); Assert.assertTrue(services.contains("OOZIE")); Assert.assertTrue(services.contains("MAPREDUCE")); Assert.assertTrue(services.contains("HBASE")); Assert.assertTrue(services.contains("ZOOKEEPER")); Assert.assertTrue(services.contains("HIVE")); }