From 8b8b1073f2bc275410b8d823940b93a4dafeb93e Mon Sep 17 00:00:00 2001 From: Andrei Savu Date: Wed, 14 Mar 2012 22:15:08 +0200 Subject: [PATCH] Added test to check that the key is decoded as expected --- .../java/org/jclouds/http/utils/ModifyRequestTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/test/java/org/jclouds/http/utils/ModifyRequestTest.java b/core/src/test/java/org/jclouds/http/utils/ModifyRequestTest.java index d38676fe84..1c1e16f629 100644 --- a/core/src/test/java/org/jclouds/http/utils/ModifyRequestTest.java +++ b/core/src/test/java/org/jclouds/http/utils/ModifyRequestTest.java @@ -147,4 +147,12 @@ public class ModifyRequestTest { assertEquals(parsedMap.get("publickey"), expected); } + @Test + public void testParseQueryWithKeysThatRequireDecoding() { + Multimap parsedMap = parseQueryToMap("network%5B0%5D.id=23&network%5B0%5D.address=192.168.0.1"); + + assertEquals(parsedMap.get("network[0].id"), ImmutableSet.of("23")); + assertEquals(parsedMap.get("network[0].address"), ImmutableSet.of("192.168.0.1")); + } + }