### Question:
LessEqualsPredicate extends ComparisonPredicate<T> { @Override public boolean evaluate(Resource resource) { Object propertyValue = resource.getPropertyValue(getPropertyId()); return propertyValue != null && compareValueTo(propertyValue) >= 0; } LessEqualsPredicate(String propertyId, Comparable<T> value); @Override boolean evaluate(Resource resource); @Override String getOperator(); @Override ComparisonPredicate<T> copy(String propertyId);  }### Answer:
@Test public void testApply() { Resource resource = new ResourceImpl(Resource.Type.HostComponent); String propertyId = PropertyHelper.getPropertyId("category1", "foo"); Predicate predicate = new LessEqualsPredicate<>(propertyId, 10); resource.setProperty(propertyId, 1); Assert.assertTrue(predicate.evaluate(resource)); resource.setProperty(propertyId, 100); Assert.assertFalse(predicate.evaluate(resource)); resource.setProperty(propertyId, 10); Assert.assertTrue(predicate.evaluate(resource)); }