@Test
public void testBuildNegativeStatesQuery() throws Exception {

  WorkflowQuery q = new WorkflowQuery().withSeriesId("series1").withoutState(WorkflowState.RUNNING)
          .withoutState(WorkflowState.PAUSED);
  String solrQuery = dao.createQuery(q, Permissions.Action.READ.toString(), true);
  String expected = "oc_org:mh_default_org AND seriesid:series1 AND (-state:running AND -state:paused AND *:*)";
  assertEquals(expected, solrQuery);
}