Introduce default error object with context for not found exceptions

This commit is contained in:
René Pfeuffer
2018-10-18 13:12:16 +02:00
parent a56aeca8d2
commit b74fb814b8
61 changed files with 395 additions and 1553 deletions

View File

@@ -63,7 +63,7 @@ public class HttpProtocolServletTest {
when(userAgentParser.parse(request)).thenReturn(userAgent);
when(userAgent.isBrowser()).thenReturn(false);
NamespaceAndName existingRepo = new NamespaceAndName("space", "repo");
when(serviceFactory.create(not(eq(existingRepo)))).thenThrow(RepositoryNotFoundException.class);
when(serviceFactory.create(not(eq(existingRepo)))).thenThrow(new RepositoryNotFoundException("x"));
when(serviceFactory.create(existingRepo)).thenReturn(repositoryService);
when(requestProvider.get()).thenReturn(httpServletRequest);
}