     """
     actual_definition = json |> JSEX.decode!(labels: :atom) |> Yodado.Definition.from_json
     expected_definition = 
-      Yodado.Definition.Any[conditions: [
-        Yodado.Definition.All[conditions: [
-          Yodado.Definition.IncludedIn[param_name: "username", value: ["madlep", "gstamp"]],
-          Yodado.Definition.IncludedIn[param_name: "host", value: ["themeforest.net", "codecanyon.net"]]
+      Yodado.Definition.Any[definitions: [
+        Yodado.Definition.All[definitions: [
+          Yodado.Definition.IncludedIn[actual_state_param_name: "username", allowed_values: ["madlep", "gstamp"]],
+          Yodado.Definition.IncludedIn[actual_state_param_name: "host", allowed_values: ["themeforest.net", "codecanyon.net"]]
         ]],
-        Yodado.Definition.Is[param_name: "session_on"],
-        Yodado.Definition.IncludedIn[param_name: "role", value: ["developer"]]
+        Yodado.Definition.Is[actual_state_param_name: "session_on"],
+        Yodado.Definition.IncludedIn[actual_state_param_name: "role", allowed_values: ["developer"]]
       ]]
 
     assert actual_definition == expected_definition

    end

    test "it generates JSON" do
      definition = Any[conditions: [true, false]]
      expected_json = "{\"operand\":\"any\",\"conditions\":[{\"operand\":\"boolean\",\"value\":true},{\"operand\":\"boolean\",\"value\":false}]}"
      actual_json = Rule.json(definition) |> JSEX.encode!
      assert actual_json == expected_json

    alias Yodado.Definition.Any, as: Any

    test "is true if any conditions match" do
      definition = Any[definitions: [false, true]]
      assert Rule.matches?(definition, [])
    end

    test "is false unless any conditions match" do
      definition = Any[definitions: [false, false]]
      assert !Rule.matches?(definition, [])
    end

    test "it passes the state through to child conditions" do
      definition = Any[definitions: [
        fn(state) -> state[:foo] == 1 end,
        fn(state) -> state[:bar] == 2 end
      ]]
