@Test
public void testGetAndSaveJobResultsError503() throws Exception {

  CloseableHttpResponse response = EasyMock.createNiceMock(CloseableHttpResponse.class);
  StatusLine status = EasyMock.createNiceMock(StatusLine.class);
  EasyMock.expect(response.getStatusLine()).andReturn(status).anyTimes();
  EasyMock.expect(status.getStatusCode()).andReturn(HttpStatus.SC_SERVICE_UNAVAILABLE).anyTimes();
  EasyMock.replay(response, status);
  Capture<HttpGet> capturedGet = Capture.newInstance();
  EasyMock.expect(httpClient.execute(EasyMock.capture(capturedGet))).andReturn(response).anyTimes();
  EasyMock.replay(httpClient);
  try {
    service.getAndSaveJobResults(JOB_ID);
  } catch (TranscriptionServiceException e) {
    Assert.assertEquals(503, e.getCode());
  }
}