diff --git a/compute/src/main/clojure/org/jclouds/predicate.clj b/compute/src/main/clojure/org/jclouds/predicate.clj index bf024c44e6..1a35f88ae4 100644 --- a/compute/src/main/clojure/org/jclouds/predicate.clj +++ b/compute/src/main/clojure/org/jclouds/predicate.clj @@ -28,5 +28,5 @@ (reify com.google.common.base.Predicate (apply [this input] (p input)))) - nil - (to-predicate [_] nil)) \ No newline at end of file + com.google.common.base.Predicate + (to-predicate [p] p)) \ No newline at end of file diff --git a/compute/src/test/clojure/org/jclouds/compute2_test.clj b/compute/src/test/clojure/org/jclouds/compute2_test.clj index fea140faea..d173b481ac 100644 --- a/compute/src/test/clojure/org/jclouds/compute2_test.clj +++ b/compute/src/test/clojure/org/jclouds/compute2_test.clj @@ -62,6 +62,9 @@ list, Alan Dipert and MeikelBrandmeyer." (is (= 1 (count (nodes *compute*)))) (is (= 1 (count (nodes-in-group *compute* "fred")))) (is (= 1 (count (nodes-with-details-matching *compute* (in-group "fred"))))) + (is (= 1 (count (nodes-with-details-matching *compute* + (reify com.google.common.base.Predicate + (apply [this input] (= (.getGroup input) "fred"))))))) (is (= 0 (count (nodes-with-details-matching *compute* (in-group "othergroup"))))) (suspend-nodes-matching *compute* (in-group "fred")) (is (suspended? (first (nodes-with-details-matching *compute* (in-group "fred")))))