@Test
public void testGetResourceProvider() throws Exception {

  ClusterDefinition clusterDefinition = new ClusterDefinition(new TestStateProvider(), new TestClusterDefinitionProvider(), new TestHostInfoProvider());
  clusterDefinition.setServiceState("HDFS", "INSTALLED");
  for (Resource.Type type : types) {
    ResourceProvider provider = AbstractResourceProvider.getResourceProvider(type, clusterDefinition);
    Set<Resource> resources = provider.getResources(PropertyHelper.getReadRequest(), null);
    for (Resource resource : resources) {
      Assert.assertEquals(type, resource.getType());
    }
  }
}