@Test
public void testStagePredicate() throws Exception {

  Predicate predicate = new PredicateBuilder().property(
      StageResourceProvider.STAGE_CLUSTER_NAME).equals("c1").toPredicate();
  List<StageEntity> entities = stageDao.findAll(PropertyHelper.getReadRequest(), predicate);
  assertEquals(5, entities.size());
  predicate = new PredicateBuilder().
      property(StageResourceProvider.STAGE_CONTEXT).equals("request context for 3").or().
      property(StageResourceProvider.STAGE_CONTEXT).equals("request context for 4").
      toPredicate();
  entities = stageDao.findAll(PropertyHelper.getReadRequest(), predicate);
  assertEquals(2, entities.size());
}