@Test public void getURIToSourceEntry_Forum() { when(publisher.getSourceType()).thenReturn(ForumNotificationTypeHandler.FORUM_SOURCE_TYPE); when(publisher.getSubcontextId()).thenReturn(subContextId); String uriToSourceEntry = uriBuilderTestObject.getURIToSourceEntry(publisher, sourceEntryId); assertEquals( "Wrong URI with type " + publisher.getSourceType(), testContextPathUri + "/url/RepositoryEntry/" + contextId + "/CourseNode/" + subContextId + "/Message/" + sourceEntryId, uriToSourceEntry); }