"is more recent than the " + "request (%s)", pid, objDate, reqDate); throw new ObjectLockedException(msg);
in.close(); } catch( IOException ioe ) { ole.printStackTrace();
"is more recent than the " + "request (%s)", pid, objDate, reqDate); throw new ObjectLockedException(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()); }