@Test(expected = TranscriptionServiceException.class)
public void testCreateRecognitionsJobErrors() throws Exception {

  EasyMock.expect(workspace.get(EasyMock.anyObject(URI.class))).andReturn(audioFile);
  EasyMock.replay(workspace);
  CloseableHttpResponse response = EasyMock.createNiceMock(CloseableHttpResponse.class);
  StatusLine status = EasyMock.createNiceMock(StatusLine.class);
  EasyMock.expect(response.getStatusLine()).andReturn(status).anyTimes();
  EasyMock.replay(response, status);
  Capture<HttpPost> capturedPost = Capture.newInstance();
  EasyMock.expect(httpClient.execute(EasyMock.capture(capturedPost))).andReturn(response).anyTimes();
  EasyMock.replay(httpClient);
  service.createRecognitionsJob(MP_ID, mediaPackage.getTrack("audioTrack1"), LANGUAGE_CODE);
}