management: make FaceId optional in fib/add|remove-nexthop commands

refs #1630

Change-Id: I1548d3aca7bf32b7184e1b72c00c45cdc4320d9b
diff --git a/tests/management/test-nfd-control-command.cpp b/tests/management/test-nfd-control-command.cpp
index 6487cd8..7b92657 100644
--- a/tests/management/test-nfd-control-command.cpp
+++ b/tests/management/test-nfd-control-command.cpp
@@ -128,6 +128,12 @@
   command.applyDefaultsToRequest(p1);
   BOOST_REQUIRE(p1.hasCost());
   BOOST_CHECK_EQUAL(p1.getCost(), 0);
+
+  p1.unsetFaceId();
+  BOOST_CHECK_NO_THROW(command.validateRequest(p1));
+  command.applyDefaultsToRequest(p1);
+  BOOST_REQUIRE(p1.hasFaceId());
+  BOOST_CHECK_EQUAL(p1.getFaceId(), 0);
 }
 
 BOOST_AUTO_TEST_CASE(FibRemoveNextHop)
@@ -146,6 +152,12 @@
     .setFaceId(0);
   BOOST_CHECK_NO_THROW(command.validateRequest(p2));
   BOOST_CHECK_THROW(command.validateResponse(p2), ControlCommand::ArgumentError);
+
+  p1.unsetFaceId();
+  BOOST_CHECK_NO_THROW(command.validateRequest(p1));
+  command.applyDefaultsToRequest(p1);
+  BOOST_REQUIRE(p1.hasFaceId());
+  BOOST_CHECK_EQUAL(p1.getFaceId(), 0);
 }
 
 BOOST_AUTO_TEST_CASE(StrategyChoiceSet)