File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
opencast-backend/annotation-impl/src/test/java/org/opencast/annotation/endpoint Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 3232import org .opencastproject .security .api .AuthorizationService ;
3333import org .opencastproject .security .api .DefaultOrganization ;
3434import org .opencastproject .security .api .SecurityService ;
35+ import org .opencastproject .security .api .UnauthorizedException ;
3536import org .opencastproject .security .api .User ;
3637import org .opencastproject .security .util .SecurityUtil ;
38+ import org .opencastproject .util .NotFoundException ;
3739
3840import org .easymock .EasyMock ;
3941import 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 );
You can’t perform that action at this time.
0 commit comments