Skip to content

Commit 4aae6fc

Browse files
Address review comments
1 parent 6bf6f25 commit 4aae6fc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

opencast-backend/annotation-impl/src/test/java/org/opencast/annotation/endpoint/TestRestService.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
import org.opencastproject.security.api.AuthorizationService;
3333
import org.opencastproject.security.api.DefaultOrganization;
3434
import org.opencastproject.security.api.SecurityService;
35+
import org.opencastproject.security.api.UnauthorizedException;
3536
import org.opencastproject.security.api.User;
3637
import org.opencastproject.security.util.SecurityUtil;
38+
import org.opencastproject.util.NotFoundException;
3739

3840
import org.easymock.EasyMock;
3941
import org.junit.Ignore;
@@ -50,7 +52,7 @@ public class TestRestService extends AbstractExtendedAnnotationsRestService {
5052
// Haven't found out who's responsible for this but that's the way it is.
5153
public static final ExtendedAnnotationServiceJpaImpl extendedAnnotationService =
5254
new ExtendedAnnotationServiceJpaImpl();
53-
static {
55+
static {
5456
extendedAnnotationService.setSearchService(getSearchService());
5557
extendedAnnotationService.setSecurityService(getSecurityService());
5658
extendedAnnotationService.setAuthorizationService(getAuthorizationService());
@@ -96,7 +98,7 @@ private static SearchService getSearchService() {
9698
SearchService searchService = EasyMock.createNiceMock(SearchService.class);
9799
try {
98100
EasyMock.expect(searchService.get(EasyMock.anyObject(String.class))).andReturn(mediaPackage).anyTimes();
99-
} catch (Exception e) {
101+
} catch (UnauthorizedException | NotFoundException e) {
100102
// Do nothing. We just have to pretend to handle checked exceptions somehow to appease the compiler.
101103
}
102104
EasyMock.replay(searchService);

0 commit comments

Comments
 (0)