diff --git a/src/test/java/com/intel/jndn/management/StrategyTestIT.java b/src/test/java/com/intel/jndn/management/StrategyTestIT.java
new file mode 100644
index 0000000..3c63dd7
--- /dev/null
+++ b/src/test/java/com/intel/jndn/management/StrategyTestIT.java
@@ -0,0 +1,56 @@
+/*
+ * jndn-management
+ * Copyright (c) 2015, 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.management;
+
+import com.intel.jndn.management.types.StrategyChoice;
+import com.intel.jndn.mock.MockKeyChain;
+import com.intel.jndn.utils.SegmentedServer;
+import java.util.List;
+import java.util.logging.Logger;
+import static junit.framework.Assert.assertEquals;
+import net.named_data.jndn.Face;
+import net.named_data.jndn.Name;
+import net.named_data.jndn.security.KeyChain;
+import org.junit.Test;
+
+/**
+ * Test strategy management on a real, local NFD
+ *
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public class StrategyTestIT {
+
+  private static final Logger logger = Logger.getLogger(StrategyTestIT.class.getName());
+  Name prefix;
+  Face face;
+
+  public StrategyTestIT() throws net.named_data.jndn.security.SecurityException {
+    this.prefix = new Name("/test/strategy");
+    this.face = new Face("localhost"); // strategy commands only available on localhost
+    KeyChain mockKeyChain = MockKeyChain.configure(new Name("/test/server"));
+    face.setCommandSigningInfo(mockKeyChain, mockKeyChain.getDefaultCertificateName());
+  }
+
+  @Test
+  public void testStrategySetUnset() throws Exception {
+    List<StrategyChoice> choices = NFD.getStrategyList(face);
+    int oldSize = choices.size();
+
+    NFD.setStrategy(face, prefix, Strategies.CLIENT_CONTROL);
+    choices = NFD.getStrategyList(face);
+    assertEquals(oldSize + 1, choices.size());
+
+    NFD.unsetStrategy(face, prefix);
+  }
+}
diff --git a/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java b/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java
new file mode 100644
index 0000000..7783bb1
--- /dev/null
+++ b/src/test/java/com/intel/jndn/management/types/StrategyChoiceTest.java
@@ -0,0 +1,56 @@
+/*
+ * jndn-management
+ * Copyright (c) 2015, 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.management.types;
+
+import com.intel.jndn.management.Strategies;
+import java.nio.ByteBuffer;
+import junit.framework.Assert;
+import net.named_data.jndn.Name;
+import net.named_data.jndn.encoding.EncodingException;
+import net.named_data.jndn.encoding.tlv.TlvDecoder;
+import net.named_data.jndn.encoding.tlv.TlvEncoder;
+import net.named_data.jndn.util.Blob;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public class StrategyChoiceTest {
+
+  public StrategyChoiceTest() {
+  }
+
+  /**
+   * Test of wireEncode method, of class StrategyChoice.
+   */
+  @Test
+  public void testEncodeDecode() throws EncodingException {
+    StrategyChoice choice = new StrategyChoice();
+    choice.setName(new Name("/a/b"));
+    choice.setStrategy(Strategies.NCC);
+
+    // encode
+    Blob encoded = choice.wireEncode();
+
+    // decode
+    StrategyChoice decoded = new StrategyChoice();
+    decoded.wireDecode(encoded.buf());
+
+    // test
+    Assert.assertEquals(choice.getName().toUri(), decoded.getName().toUri());
+    Assert.assertEquals(choice.getStrategy().toUri(), decoded.getStrategy().toUri());
+  }
+}
