fix all test failures

Change-Id: Iead2d25adc95ad1d7d2252a854dc8ba854c90889
diff --git a/tests/unit-tests/challenge-credential.t.cpp b/tests/unit-tests/challenge-credential.t.cpp
index 566ffd8..2b8e9b2 100644
--- a/tests/unit-tests/challenge-credential.t.cpp
+++ b/tests/unit-tests/challenge-credential.t.cpp
@@ -70,7 +70,6 @@
   selfSigned.setContent(makeStringBlock(tlv::Content, "123"));
   m_keyChain.sign(selfSigned, signingByCertificate(trustAnchor));
 
-  // generate SELECT interest
   std::stringstream ss;
   io::save<security::v2::Certificate>(selfSigned, ss);
   auto checkCert = *(io::load<security::v2::Certificate>(ss));
@@ -89,10 +88,12 @@
   ss.clear();
 
   Block params = makeEmptyBlock(tlv_encrypted_payload);
-  params.push_back(makeStringBlock(tlv_parameter_key, ChallengeCredential::JSON_CREDENTIAL_SELF));
-  params.push_back(makeStringBlock(tlv_parameter_value, selfSignedStr));
+  params.push_back(makeStringBlock(tlv_selected_challenge, "Credential"));
   params.push_back(makeStringBlock(tlv_parameter_key, ChallengeCredential::JSON_CREDENTIAL_CERT));
   params.push_back(makeStringBlock(tlv_parameter_value, credentialStr));
+  params.push_back(makeStringBlock(tlv_parameter_key, ChallengeCredential::JSON_CREDENTIAL_SELF));
+  params.push_back(makeStringBlock(tlv_parameter_value, selfSignedStr));
+  params.encode();
 
   challenge.handleChallengeRequest(params, request);
   BOOST_CHECK_EQUAL(request.m_status, STATUS_PENDING);