prop_getRequestedNames :: Property
prop_getRequestedNames =
  forAll genName $ \node1 ->
  let chk = getRequestedNames . Query (ItemTypeOpCode QRNode) []
      q_node1 = QuotedString node1
      eq_name = EQFilter "name"
      eq_node1 = eq_name q_node1
  in conjoin [ counterexample "empty filter" $ chk EmptyFilter ==? []
             , counterexample "and filter" $ chk (AndFilter [eq_node1]) ==? []
             , counterexample "simple equality" $ chk eq_node1 ==? [node1]
             , counterexample "non-name field" $
               chk (EQFilter "foo" q_node1) ==? []
             , counterexample "non-simple filter" $
               chk (OrFilter [ eq_node1 , LTFilter "foo" q_node1]) ==? []
             ]
prop_getRequestedNames :: Property
prop_getRequestedNames =
  forAll genName $ \node1 ->
  let chk = getRequestedNames . Query (ItemTypeOpCode QRNode) []
      q_node1 = QuotedString node1
      eq_name = EQFilter "name"
      eq_node1 = eq_name q_node1
  in conjoin [ counterexample "empty filter" $ chk EmptyFilter ==? []
             , counterexample "and filter" $ chk (AndFilter [eq_node1]) ==? []
             , counterexample "simple equality" $ chk eq_node1 ==? [node1]
             , counterexample "non-name field" $
               chk (EQFilter "foo" q_node1) ==? []
             , counterexample "non-simple filter" $
               chk (OrFilter [ eq_node1 , LTFilter "foo" q_node1]) ==? []
             ]
prop_getRequestedNames =
  forAll genName $ \node1 ->
  let chk = getRequestedNames . Query (ItemTypeOpCode QRNode) []
      q_node1 = QuotedString node1
      eq_name = EQFilter "name"
      eq_node1 = eq_name q_node1
  in conjoin [ counterexample "empty filter" $ chk EmptyFilter ==? []
             , counterexample "and filter" $ chk (AndFilter [eq_node1]) ==? []
             , counterexample "simple equality" $ chk eq_node1 ==? [node1]
             , counterexample "non-name field" $
               chk (EQFilter "foo" q_node1) ==? []
             , counterexample "non-simple filter" $
               chk (OrFilter [ eq_node1 , LTFilter "foo" q_node1]) ==? []
             ]