JavaHLRepositoryService extends AbstractRepositoryService { @Override public List<LogEntry> getLogEntries(SVNConnection connection, RepositoryName repositoryName, long fromRevision, long toRevision, String path, long limit, boolean stopOnCopy, boolean includeChangedPaths) throws SventonException { return getLogEntriesInternal(connection, fromRevision, toRevision, encodeUri(path), limit, stopOnCopy, includeChangedPaths); }  @Override LogEntry getLogEntry(SVNConnection connection, RepositoryName repositoryName, long revision); @Override List<LogEntry> getLogEntriesFromRepositoryRoot(SVNConnection connection, long fromRevision, long toRevision); @Override List<LogEntry> getLogEntries(SVNConnection connection, RepositoryName repositoryName, long fromRevision,
                                      long toRevision, String path, long limit, boolean stopOnCopy,
                                      boolean includeChangedPaths); @Override void export(final SVNConnection connection, final List<PathRevision> targets, final long pegRevision,
                     final File exportDirectory); @Override void getFileContents(SVNConnection connection, String path, long revision, OutputStream output); @Override Properties listProperties(SVNConnection connection, String path, long revision); @Override Long getLatestRevision(SVNConnection connection); @Override DirEntry.Kind getNodeKind(SVNConnection connection, String path, long revision); @Override Map<String, DirEntryLock> getLocks(final SVNConnection connection, final String startPath, final boolean recursive); @Override DirList list(final SVNConnection connection, final String path, final long revision); @Override DirEntry getEntryInfo(SVNConnection connection, final String path, long revision); @Override List<FileRevision> getFileRevisions(SVNConnection connection, String path, long revision); @Override String diffUnified(final SVNConnection connection, final PathRevision from, final PathRevision to,
                            final Revision pegRevision, final String charset); @Override List<DiffStatus> diffPaths(final SVNConnection connection, final PathRevision from, final PathRevision to); @Override AnnotatedTextFile blame(SVNConnection connection, String path, long revision, String charset, Colorer colorer); @Override Revision translateRevision(SVNConnection connection, Revision revision, long headRevision); @Override List<Long> getRevisionsForPath(SVNConnection connection, String path, long fromRevision, long toRevision,
                                        boolean stopOnCopy, long limit);  }
@Test public void testGetLogEntries() throws Exception { final Map<String, String> propMap = new HashMap<String, String>(); final ChangePath cp1 = mock(ChangePath.class); final ChangePath cp2 = mock(ChangePath.class); final ChangePath[] changePaths = {cp1, cp2}; final int rev = 4711; final Date date = new Date(); final String dateString = DateUtil.formatISO8601(date); MapUtils.putAll(propMap, new String[][]{ {"svn:author", "daAuthor"}, {"svn:date", dateString}, {"svn:log", "Added new text in my finest file"} }); when(cp1.getPath()).thenReturn("/trunk/src/main/da/path/myfile.txt"); when(cp1.getAction()).thenReturn('M'); when(cp1.getCopySrcPath()).thenReturn(null); when(cp1.getCopySrcRevision()).thenReturn(-1L); when(cp2.getPath()).thenReturn("/branches/lemontree/src/main/da/path/myfile.txt"); when(cp2.getAction()).thenReturn('A'); when(cp2.getCopySrcPath()).thenReturn(null); when(cp2.getCopySrcRevision()).thenReturn(-1L); when(connection.getRepositoryRootUrl()).thenReturn(new SVNURL("svn: doAnswer(new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { Object[] args = invocation.getArguments(); final LogMessageCallback cb = (LogMessageCallback) args[8]; cb.singleMessage(changePaths, rev, propMap, false); return null; } }).when(client).logMessages(eq("svn: eq(false), eq(false), eq(false), (String[]) any(), anyInt(), (LogMessageCallback) any()); final List<LogEntry> logEntries = service.getLogEntries(connection, null, 1, 100, "da/path", 100, false, false); assertEquals(1, logEntries.size()); final LogEntry logEntry = logEntries.get(0); final SortedSet<ChangedPath> changedPaths = logEntry.getChangedPaths(); assertEquals(2, changedPaths.size()); ChangedPath[] paths = new ChangedPath[2]; changedPaths.toArray(paths); assertEquals("/branches/lemontree/src/main/da/path/myfile.txt", paths[0].getPath()); assertEquals(ChangeType.ADDED, paths[0].getType()); assertEquals("/trunk/src/main/da/path/myfile.txt", paths[1].getPath()); assertEquals(ChangeType.MODIFIED, paths[1].getType()); assertEquals("daAuthor", logEntry.getAuthor()); assertEquals("Added new text in my finest file", logEntry.getMessage()); assertEquals(4711, logEntry.getRevision()); }