@Test
public void emptyDisjunctionValuesTest() throws QueryBuilderException {

  // GIVEN
  UiAnalysis analysis = createAnalysis("select a, count() group by a order by a asc", null, Arrays
      .asList(new UiSliceDisjunction("a", Arrays.asList("5", "6")), new UiSliceDisjunction("b", Arrays.asList())));
  // WHEN
  String queryBuilderDiql = generateQueryBuilder(analysis).build();
  ExecutionRequest queryBuilderRequest = parse(queryBuilderDiql);
  // THEN
  // UiSliceDisjunction "b" is ignored, since it does not have any value! This is needed because in the UI we can
  // remove the last "value" from a disjunction easily, but most probably do not want that disjunction to evaluate to
  // "false" and no rows being returned therefore.
  String expectedDiql = "select a, count() from " + TABLE + " where a = 5 or a = 6 group by a order by a asc";
  ExecutionRequest expectedRequest = parse(expectedDiql);
  Assert.assertEquals(queryBuilderRequest, expectedRequest,
      "Built query found to be not equal to the genrated one. Expected: '" + expectedDiql + "' but was '"
          + queryBuilderDiql + "'");
}