mockSupport.replayAll();
LoggingService loggingService =</BUG>
new LoggingService(expectedClusterName, controllerFactoryMock, helperFactoryMock);
Response resource = loggingService.getSearchEngine("", null, uriInfoMock);
assertNotNull("The response returned by the LoggingService should not have been null",
<BUG>resource);
assertEquals("An OK status should have been returned",</BUG>
HttpURLConnection.HTTP_NOT_FOUND, resource.getStatus());
assertNotNull("A non-null Entity should have been returned",
resource.getEntity());

mockSupport.replayAll();
AuthorizationHelperInitializer.viewInstanceDAOReturningNull();
SecurityContextHolder.getContext().setAuthentication(authentication);
LoggingService loggingService =
new LoggingService(expectedClusterName, controllerFactoryMock, helperFactoryMock);
Response resource = loggingService.getSearchEngine("", null, uriInfoMock);
assertNotNull("The response returned by the LoggingService should not have been null",
resource);
if(shouldBeAuthorized) {
assertEquals("An OK status should have been returned",
HttpURLConnection.HTTP_NOT_FOUND, resource.getStatus());
assertNotNull("A non-null Entity should have been returned",
resource.getEntity());
