diff --git a/src/main/java/com/intel/jndn/utils/impl/KeyChainFactory.java b/src/main/java/com/intel/jndn/utils/impl/KeyChainFactory.java
index d8fdc59..ccf08f6 100644
--- a/src/main/java/com/intel/jndn/utils/impl/KeyChainFactory.java
+++ b/src/main/java/com/intel/jndn/utils/impl/KeyChainFactory.java
@@ -1,31 +1,15 @@
 /*
- * ******************************************************************************
+ * jndn-utils
+ * Copyright (c) 2016, Intel Corporation.
  *
- * INTEL CONFIDENTIAL
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 3, as published by the Free Software Foundation.
  *
- * Copyright 2013 - 2016 Intel Corporation All Rights Reserved.
- *
- * The source code contained or described herein and all documents related to
- * the source code ("Material") are owned by Intel Corporation or its suppliers
- * or licensors. Title to the Material remains with Intel Corporation or its
- * suppliers and licensors. The Material contains trade secrets and proprietary
- * and confidential information of Intel or its suppliers and licensors. The
- * Material is protected by worldwide copyright and trade secret laws and treaty
- * provisions. No part of the Material may be used, copied, reproduced,
- * modified, published, uploaded, posted, transmitted, distributed, or disclosed
- * in any way without Intel's prior express written permission.
- *
- * No license under any patent, copyright, trade secret or other intellectual
- * property right is granted to or conferred upon you by disclosure or delivery
- * of the Materials, either expressly, by implication, inducement, estoppel or
- * otherwise. Any license under such intellectual property rights must be
- * express and approved by Intel in writing.
- *
- * Unless otherwise agreed by Intel in writing, you may not remove or alter this
- * notice or any other notice embedded in Materials by Intel or Intel's
- * suppliers or licensors in any way.
- *
- * ******************************************************************************
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
+ * more details.
  */
 
 package com.intel.jndn.utils.impl;
@@ -49,6 +33,12 @@
  */
 public class KeyChainFactory {
     /**
+     * Private constructor
+     */
+    private KeyChainFactory() {
+    }
+    
+    /**
      * Build and configure an NDN {@link KeyChain} from the file system; looks in the ~/.ndn folder for keys and
      * identity SQLite DB.
      *
diff --git a/src/test/java/com/intel/jndn/utils/impl/KeyChainFactoryTest.java b/src/test/java/com/intel/jndn/utils/impl/KeyChainFactoryTest.java
new file mode 100644
index 0000000..21c39c1
--- /dev/null
+++ b/src/test/java/com/intel/jndn/utils/impl/KeyChainFactoryTest.java
@@ -0,0 +1,80 @@
+/*
+ * jndn-utils
+ * Copyright (c) 2016, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU Lesser General Public License,
+ * version 3, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
+ * more details.
+ */
+
+package com.intel.jndn.utils.impl;
+
+import net.named_data.jndn.Data;
+import net.named_data.jndn.Name;
+import net.named_data.jndn.security.KeyChain;
+import net.named_data.jndn.security.certificate.IdentityCertificate;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import com.intel.jndn.utils.impl.KeyChainFactory;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Andrew Brown, andrew.brown@intel.com
+ */
+@RunWith(Parameterized.class)
+public class KeyChainFactoryTest {
+    private final KeyChain instance;
+
+    public KeyChainFactoryTest(KeyChain instance) {
+        this.instance = instance;
+    }
+
+    @Parameterized.Parameters
+    public static Collection<KeyChain[]> data() throws Exception {
+        Name identity = new Name("/test/identity");
+        return Arrays.asList(new KeyChain[][]{{KeyChainFactory.configureKeyChain(identity)}, {KeyChainFactory.configureTestKeyChain(identity)}});
+    }
+
+    /*
+     * getAnyCertificate has been removed, so this test might be deprecated.
+     */
+    @Test
+    public void testKeyChainUsage() throws Exception {
+        // check certificate
+        Name certName = instance.getDefaultCertificateName();
+        IdentityCertificate cert = instance.getCertificate(certName); // note that we have to use getAnyCertificate because the generated certificate is not valid
+        assertNotNull(cert);
+
+        // check signature
+        byte[] signature = cert.getSignature().getSignature().getImmutableArray();
+        assertTrue(signature.length > 0);
+
+        // sign a data packet
+        Data data = new Data(new Name("/a/b/c"));
+        instance.signByIdentity(data);
+
+        // verify that the packet was signed
+        CountDownLatch latch = new CountDownLatch(1);
+        instance.verifyData(data, data1 -> latch.countDown(), data1 -> {
+        });
+        latch.await(2, TimeUnit.SECONDS); // verification should be instantaneous... but just in case
+
+        // check that the signature verified
+        assertEquals(0, latch.getCount());
+    }
+}
\ No newline at end of file
