@Test
public void testApplyWithMap() {

  Resource resource = new ResourceImpl(Resource.Type.HostComponent);
  String propertyId = PropertyHelper.getPropertyId("category1", "mapProperty");
  Predicate predicate = new CategoryIsEmptyPredicate(propertyId);
  Assert.assertTrue(predicate.evaluate(resource));
  Map<String, String> mapProperty = new HashMap<String, String>();
  resource.setProperty(propertyId, mapProperty);
  Assert.assertTrue(predicate.evaluate(resource));
  mapProperty.put("foo", "bar");
  Assert.assertFalse(predicate.evaluate(resource));
}