Assert.assertEquals(8, resources.size());
}
@Test
public void testGetResourcesWithPredicate() throws Exception {
ClusterDefinition clusterDefinition = new ClusterDefinition(new TestStateProvider(), new TestClusterDefinitionProvider(), new TestHostInfoProvider());
ServiceProvider provider = new ServiceProvider(clusterDefinition);
Predicate predicate = new PredicateBuilder().property(ServiceProvider.SERVICE_SERVICE_NAME_PROPERTY_ID).equals("MAPREDUCE").toPredicate();
Set<Resource> resources = provider.getResources(PropertyHelper.getReadRequest(), predicate);
Assert.assertEquals(1, resources.size());