UriBuilder { public String getURIToContext(Publisher publisher) { return getURI(getBusinessPathToContext(publisher)); } UriBuilder(); String getURIToContext(Publisher publisher); String getURIToEventSource(Publisher publisher); String getURIToSourceEntry(Publisher publisher, String sourceEntryId); void setServerContextPathURI(String serverContextPathURI); String getNotificationTabContext(); String getUriToNotificationSettings(); String getUriToNotificationNews();  }
@Test public void getURIToContext_ContextType_COURSE() { String uriToContext = uriBuilderTestObject.getURIToContext(publisher); assertEquals("Wrong URI to context", testContextPathUri + "/url/RepositoryEntry/" + contextId, uriToContext); }
@Test public void getURIToContext_ContextType_UNKOWN() { Publisher publisherUnkown = mock(Publisher.class); when(publisherUnkown.getContextType()).thenReturn(ContextType.UNKNOWN); String uriToContext = uriBuilderTestObject.getURIToContext(publisherUnkown); assertEquals("Wrong URI with unkown type", testContextPathUri + "/url/UNKOWN/0", uriToContext); }