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