@Test
public void testAuthenticateDuplicateProperties() {

  // Test duplicate query properties.
  String twoOrgs = ResourceRequest.ENCRYPTION_ID_KEY + "=org1&" + ResourceRequest.ENCRYPTION_ID_KEY + "=org2";
  assertEquals(Status.BadRequest,
          ResourceRequestUtil.resourceRequestFromQueryString(twoOrgs, clientIp, null, properties, true).getStatus());
  String twoPolicies = ResourceRequest.POLICY_KEY + "=policy1&" + ResourceRequest.POLICY_KEY + "=policy2";
  assertEquals(Status.BadRequest, ResourceRequestUtil
          .resourceRequestFromQueryString(twoPolicies, clientIp, null, properties, true).getStatus());
  String twoSignatures = ResourceRequest.SIGNATURE_KEY + "=signature1&" + ResourceRequest.SIGNATURE_KEY
          + "=signature1";
  assertEquals(Status.BadRequest, ResourceRequestUtil
          .resourceRequestFromQueryString(twoSignatures, clientIp, null, properties, true).getStatus());
}