prop_queryGroup_noUnknown :: Property
prop_queryGroup_noUnknown =
  forAll (choose (0, maxNodes) >>= genEmptyCluster) $ \cluster ->
  forAll (elements (Map.keys Group.fieldsMap)) $ \field -> monadicIO $ do
    QueryResult fdefs fdata <-
      run (query cluster False (Query (ItemTypeOpCode QRGroup)
                                [field] EmptyFilter)) >>=
           resultProp
    QueryFieldsResult fdefs' <-
      resultProp $ queryFields (QueryFields (ItemTypeOpCode QRGroup) [field])
    _ <- stop $ conjoin
      [ counterexample ("Got unknown fields via query (" ++ show fdefs ++ ")")
           (hasUnknownFields fdefs)
      , counterexample ("Got unknown result status via query (" ++
                        show fdata ++ ")")
        (all (all ((/= RSUnknown) . rentryStatus)) fdata)
      , counterexample ("Got unknown fields via query fields (" ++ show fdefs'
                        ++ ")") (hasUnknownFields fdefs')
      ]
    return ()
prop_queryGroup_noUnknown :: Property
prop_queryGroup_noUnknown =
  forAll (choose (0, maxNodes) >>= genEmptyCluster) $ \cluster ->
  forAll (elements (Map.keys Group.fieldsMap)) $ \field -> monadicIO $ do
    QueryResult fdefs fdata <-
      run (query cluster False (Query (ItemTypeOpCode QRGroup)
                                [field] EmptyFilter)) >>=
           resultProp
    QueryFieldsResult fdefs' <-
      resultProp $ queryFields (QueryFields (ItemTypeOpCode QRGroup) [field])
    _ <- stop $ conjoin
      [ counterexample ("Got unknown fields via query (" ++ show fdefs ++ ")")
           (hasUnknownFields fdefs)
      , counterexample ("Got unknown result status via query (" ++
                        show fdata ++ ")")
        (all (all ((/= RSUnknown) . rentryStatus)) fdata)
      , counterexample ("Got unknown fields via query fields (" ++ show fdefs'
                        ++ ")") (hasUnknownFields fdefs')
      ]
    return ()
prop_queryGroup_noUnknown =
  forAll (choose (0, maxNodes) >>= genEmptyCluster) $ \cluster ->
  forAll (elements (Map.keys Group.fieldsMap)) $ \field -> monadicIO $ do
    QueryResult fdefs fdata <-
      run (query cluster False (Query (ItemTypeOpCode QRGroup)
                                [field] EmptyFilter)) >>=
           resultProp
    QueryFieldsResult fdefs' <-
      resultProp $ queryFields (QueryFields (ItemTypeOpCode QRGroup) [field])
    _ <- stop $ conjoin
      [ counterexample ("Got unknown fields via query (" ++ show fdefs ++ ")")
           (hasUnknownFields fdefs)
      , counterexample ("Got unknown result status via query (" ++
                        show fdata ++ ")")
        (all (all ((/= RSUnknown) . rentryStatus)) fdata)
      , counterexample ("Got unknown fields via query fields (" ++ show fdefs'
                        ++ ")") (hasUnknownFields fdefs')
      ]
    return ()