RestUri { public String getDocId() { return docId; } RestUri(URI uri); boolean isRootOnly(); String getRawPath(); String getNamespace(); String getDocumentType(); String getDocId(); Optional<Group> getGroup(); String generateFullId(); static final char NUMBER_STREAMING; static final char GROUP_STREAMING; static final String DOCUMENT; static final String V_1; static final String ID; }
@Test public void testOneSlashTooMuchWhichIsFine() throws Exception { RestUri restUri = new RestUri(createUri("/document/v1/namespace/doctype/docid/myid:342:23/wrong", "")); assertThat(restUri.getDocId(), is("myid:342:23/wrong")); }