summaryrefslogtreecommitdiffstats
path: root/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java')
-rw-r--r--vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java
index b2a8200b4e1..5dc0cef9e1a 100644
--- a/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java
+++ b/vespaclient-container-plugin/src/test/java/com/yahoo/document/restapi/RestUriTest.java
@@ -94,6 +94,16 @@ public class RestUriTest {
}
@Test
+ public void testGroupUrlDecode() throws Exception {
+ RestUri restUri = new RestUri(createUri("/document/v1/namespace/doctype/group/group#123/myid", ""));
+ assertThat(restUri.getDocId(), is("myid"));
+ assertThat(restUri.getDocumentType(), is("doctype"));
+ assertThat(restUri.getGroup().get().name, is('g'));
+ assertThat(restUri.getGroup().get().value, is("group#123"));
+ assertThat(restUri.generateFullId(), is("id:namespace:doctype:g=group#123:myid"));
+ }
+
+ @Test
public void testGroupN() throws Exception {
RestUri restUri = new RestUri(createUri("/document/v1/namespace/doctype/number/group/myid", ""));
assertThat(restUri.getGroup().get().name, is('n'));