In this example the last test fails.
I have used org.codehause.mojo.rpm.Mapping(link: 1) as the example as this is where I discovered the bug.
(link: 1) http://mojo.codehaus.org/rpm-maven-plugin/apidocs/org/codehaus/mojo/rpm/Mapping.html
Tests:
(do
(use 'clojure.java.data
'clojure.test)
(import '(link: org.codehaus.mojo.rpm Mapping))
(testing "setting normally"
(let (link: mapping (Mapping.))
(.setConfiguration mapping "a value")
(.setDirectory mapping "/tmp")
(is (= (.getDirectory mapping) "/tmp"))
(is (= (.getConfiguration mapping) "a value"))))
(testing "setting via java-data"
(let (link: mapping (to-java Mapping {:configuration "a value" :directory "/tmp"}))
(is (= (.getDirectory mapping) "/tmp"))
(is (= (.getConfiguration mapping) "a value")))))