diff --git a/Data/Refcount.hs b/Data/Refcount.hs
--- a/Data/Refcount.hs
+++ b/Data/Refcount.hs
@@ -1,27 +1,40 @@
+{-# LANGUAGE DeriveGeneric #-}
 module Data.Refcount ( Refcount (..)
                      , refcount
                      , refcounted
                      , insertRef
                      , deleteRef
                      , removeRef
+                     , Data.Refcount.fromList
                      ) where
 
 import Control.Applicative ((<$>))
+import Data.Foldable as Foldable
 import Data.Maybe
 import Data.Monoid
 import Data.Hashable
 import Data.HashMap.Strict as HashMap
+import GHC.Generics
+import Test.QuickCheck (Arbitrary (..))
 
 -- | Maintain a collection of objects with duplication counts.
 newtype Refcount a = Refcount { unRefcount :: HashMap a Int }
+  deriving (Show, Generic, Eq)
 
 instance (Hashable a, Eq a) => Monoid (Refcount a) where
   mempty = Refcount empty
   mappend (Refcount a) (Refcount b) = Refcount $ unionWith (+) a b
 
+instance (Arbitrary a, Hashable a, Eq a) => Arbitrary (Refcount a) where
+  arbitrary = Data.Refcount.fromList <$> arbitrary
+
 -- | Retrieve the refcounted objects.
 refcounted :: Refcount a -> [a]
 refcounted = keys . unRefcount
+
+-- | Create a counted structure from a list of elements.
+fromList :: (Hashable a, Eq a) => [a] -> Refcount a
+fromList = Foldable.foldl' (\rc r -> insertRef r rc) mempty
 
 -- | Lookup the count of an object.
 refcount :: (Hashable a, Eq a) => a -> Refcount a -> Int
diff --git a/refcount.cabal b/refcount.cabal
--- a/refcount.cabal
+++ b/refcount.cabal
@@ -1,5 +1,5 @@
 name:               refcount
-version:            0.0.1
+version:            0.1.1
 synopsis:           Container with element counts
 category:           Data
 license:            MIT
@@ -10,15 +10,34 @@
 build-type:         Simple
 cabal-version:      >= 1.9.2
 
+source-repository head
+  type: git
+  location: https://github.com/RobotGymnast/refcount.git
+
 library
     hs-source-dirs:   .
     ghc-options:      -Wall
     exposed-modules:  Data.Refcount
 
     build-depends: base == 4.*
-                 , hashable == 1.2.1.*
-                 , unordered-containers == 0.2.4.*
+                 , hashable == 1.2.*
+                 , unordered-containers == 0.2.*
+                 , QuickCheck >= 2.6 && < 2.8
 
-source-repository head
-  type: git
-  location: https://github.com/RobotGymnast/refcount
+test-suite Tests
+    type:           exitcode-stdio-1.0
+    hs-source-dirs: . test
+    main-is:        TestMain.hs
+    GHC-Options:    -Wall -fno-warn-missing-signatures
+
+    build-depends : base
+                  , hashable
+                  , refcount
+                  , HUnit == 1.2.*
+                  , QuickCheck
+                  , test-framework-quickcheck2 == 0.3.*
+                  , test-framework-hunit == 0.3.*
+                  , test-framework-th
+                  , test-framework
+                  , unordered-containers
+                  , Cabal
diff --git a/test/TestMain.hs b/test/TestMain.hs
new file mode 100644
--- /dev/null
+++ b/test/TestMain.hs
@@ -0,0 +1,23 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE TemplateHaskell #-}
+import Control.Applicative
+import Data.Refcount
+import Test.Framework.Providers.QuickCheck2
+import Test.Framework.TH
+
+main = $(defaultMainGenerator)
+
+infix 4 ==.
+
+(==.) :: (Applicative f, Eq a) => f a -> f a -> f Bool
+(==.) = liftA2 (==)
+
+prop_insert_remove :: a ~ Integer => a -> Refcount a -> Bool
+prop_insert_remove a = (deleteRef a . insertRef a) ==. Just
+
+prop_insert_remove_refcount :: a ~ Integer => a -> Refcount a -> Bool
+prop_insert_remove_refcount a r
+    = let i = insertRef a r
+          d = deleteRef a i
+      in refcount a i == refcount a r + 1
+      && (refcount a <$> d) == Just (refcount a i - 1)
