CustomURIResolver implements URIResolver { static DocRef parseDocRef(final String href) { return new DocRef( getPart("type", href, PipelineDoc.DOCUMENT_TYPE), getPart("uuid", href, href), getPart("name", href, null)); } @Inject  CustomURIResolver(final XsltStore xsltStore); Source resolve(final String href, final String base);  }
@Test void testParseDocRef() { DocRef docRef = CustomURIResolver.parseDocRef("test-uuid"); assertThat(docRef.getUuid()).isEqualTo("test-uuid"); assertThat(docRef.getName()).isNull(); docRef = new DocRef(PipelineDoc.DOCUMENT_TYPE, "test-uuid", "test-name"); final DocRef parsed = CustomURIResolver.parseDocRef(docRef.toString()); assertThat(parsed).isEqualTo(docRef); }