Add strategy dataset retrieval and tests
diff --git a/src/main/java/com/intel/jndn/management/NFD.java b/src/main/java/com/intel/jndn/management/NFD.java
index c5c8f20..d1f0450 100644
--- a/src/main/java/com/intel/jndn/management/NFD.java
+++ b/src/main/java/com/intel/jndn/management/NFD.java
@@ -20,6 +20,7 @@
 import com.intel.jndn.management.types.ForwarderStatus;
 import com.intel.jndn.management.types.LocalControlHeader;
 import com.intel.jndn.management.types.RibEntry;
+import com.intel.jndn.management.types.StrategyChoice;
 import com.intel.jndn.utils.SimpleClient;
 import com.intel.jndn.utils.SegmentedClient;
 import java.io.IOException;
@@ -148,6 +149,21 @@
   }
 
   /**
+   * Retrieve the list of strategy choice entries from the NFD; calls
+   * /localhost/nfd/rib/list which requires a local Face (all non-local packets
+   * are dropped).
+   *
+   * @param forwarder only a localhost Face
+   * @return a list of strategy choice entries, i.e. routes, see
+   * http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice.
+   * @throws java.lang.Exception
+   */
+  public static List<StrategyChoice> getStrategyList(Face forwarder) throws Exception {
+    Data data = retrieveDataSet(forwarder, new Name("/localhost/nfd/strategy-choice/list"));
+    return StatusDataset.wireDecode(data.getContent(), StrategyChoice.class);
+  }
+
+  /**
    * Retrieve the {@link KeyLocator} for an NFD.
    *
    * @param forwarder only a localhost {@link Face}
@@ -442,7 +458,8 @@
    *
    * @param forwarder only a localhost Face
    * @param prefix the {@link Name} prefix
-   * @param strategy the {@link Name} of the strategy to set, e.g. /localhost/nfd/strategy/broadcast
+   * @param strategy the {@link Name} of the strategy to set, e.g.
+   * /localhost/nfd/strategy/broadcast
    * @throws Exception if the command fails
    */
   public static void setStrategy(Face forwarder, Name prefix, Name strategy) throws Exception {
diff --git a/src/main/java/com/intel/jndn/management/Strategies.java b/src/main/java/com/intel/jndn/management/Strategies.java
new file mode 100644
index 0000000..f8816be
--- /dev/null
+++ b/src/main/java/com/intel/jndn/management/Strategies.java
@@ -0,0 +1,30 @@
+/*
+ * 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 net.named_data.jndn.Name;
+
+/**
+ * A reference list of the strategies available in NFD; should match
+ * <a href="http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#Strategy">
+ * http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#Strategy</a>
+ *
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public class Strategies {
+  public static final Name BEST_ROUTE = new Name("/localhost/nfd/strategy/best-route");
+  public static final Name BROADCAST = new Name("/localhost/nfd/strategy/broadcast");
+  public static final Name CLIENT_CONTROL = new Name("/localhost/nfd/strategy/client-control");
+  public static final Name NCC = new Name("/localhost/nfd/strategy/ncc");
+}
diff --git a/src/main/java/com/intel/jndn/management/types/StrategyChoice.java b/src/main/java/com/intel/jndn/management/types/StrategyChoice.java
new file mode 100644
index 0000000..962b699
--- /dev/null
+++ b/src/main/java/com/intel/jndn/management/types/StrategyChoice.java
@@ -0,0 +1,118 @@
+/*
+ * 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.EncodingHelper;
+import static com.intel.jndn.management.types.RibEntry.TLV_RIB_ENTRY;
+import java.nio.ByteBuffer;
+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;
+
+/**
+ * Represent a strategy choice entry.
+ *
+ * @see http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice
+ * @author Andrew Brown <andrew.brown@intel.com>
+ */
+public class StrategyChoice implements Decodable {
+
+  /**
+   * TLV type, see
+   * <a href="http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#TLV-TYPE-assignments">http://redmine.named-data.net/projects/nfd/wiki/StrategyChoice#TLV-TYPE-assignments</a>
+   */
+  public final static int TLV_STRATEGY_CHOICE = 128;
+
+  /**
+   * Encode using a new TLV encoder.
+   *
+   * @return The encoded buffer.
+   */
+  public final Blob wireEncode() {
+    TlvEncoder encoder = new TlvEncoder();
+    wireEncode(encoder);
+    return new Blob(encoder.getOutput(), false);
+  }
+
+  /**
+   * Encode as part of an existing encode context.
+   *
+   * @param encoder
+   */
+  public final void wireEncode(TlvEncoder encoder) {
+    int saveLength = encoder.getLength();
+    EncodingHelper.encodeName(name, encoder);
+    EncodingHelper.encodeName(strategy, encoder);
+    encoder.writeTypeAndLength(TLV_STRATEGY_CHOICE, encoder.getLength() - saveLength);
+  }
+
+  /**
+   * Decode the input from its TLV format.
+   *
+   * @param input The input buffer to decode. This reads from position() to
+   * limit(), but does not change the position.
+   * @throws EncodingException For invalid encoding.
+   */
+  public final void wireDecode(ByteBuffer input) throws EncodingException {
+    TlvDecoder decoder = new TlvDecoder(input);
+    wireDecode(decoder);
+  }
+
+  /**
+   * Decode as part of an existing decode context.
+   *
+   * @param decoder
+   * @throws EncodingException
+   */
+  @Override
+  public final void wireDecode(TlvDecoder decoder) throws EncodingException {
+    int endOffset = decoder.readNestedTlvsStart(TLV_RIB_ENTRY);
+    strategy = EncodingHelper.decodeName(decoder);
+    name = EncodingHelper.decodeName(decoder);
+    decoder.finishNestedTlvs(endOffset);
+  }
+
+  /**
+   * @return the {@link Name} of the prefix the strategy is applied to
+   */
+  public Name getName() {
+    return name;
+  }
+
+  /**
+   * @return the {@link Name} of the strategy
+   */
+  public Name getStrategy() {
+    return strategy;
+  }
+
+  /**
+   * @param name the {@link Name} to set
+   */
+  public void setName(Name name) {
+    this.name = name;
+  }
+
+  /**
+   * @param strategy the {@link Name} to set
+   */
+  public void setStrategy(Name strategy) {
+    this.strategy = strategy;
+  }
+
+  private Name name;
+  private Name strategy;
+}