"request (%s)", pid, datastreamId, dsDate, reqDate); throw new DatastreamLockedException(msg);
"request (%s)", pid, datastreamId, dsDate, reqDate); throw new DatastreamLockedException(msg);
"request (%s)", pid, datastreamId, dsDate, reqDate); throw new DatastreamLockedException(msg);
"request (%s)", pid, datastreamId, dsDate, reqDate); throw new DatastreamLockedException(msg);
@Test public void testExceptionResponses() throws Exception { Response output = null; output = test.handleException(new ObjectNotFoundException("This is testing exception handling"), false); assertEquals(HttpStatus.SC_NOT_FOUND, output.getStatus()); output = test.handleException(new ObjectNotInLowlevelStorageException("This is testing exception handling"), false); assertEquals(HttpStatus.SC_NOT_FOUND, output.getStatus()); output = test.handleException(new DatastreamNotFoundException("This is testing exception handling"), false); assertEquals(HttpStatus.SC_NOT_FOUND, output.getStatus()); output = test.handleException(new ObjectLockedException("This is testing exception handling"), false); assertEquals(HttpStatus.SC_CONFLICT, output.getStatus()); output = test.handleException(new DatastreamLockedException("This is testing exception handling"), false); assertEquals(HttpStatus.SC_CONFLICT, output.getStatus()); output = test.handleException(new RangeNotSatisfiableException("This is testing exception handling"), false); assertEquals(HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE, output.getStatus()); }