Assert.assertEquals(204, response.getStatus());
}
@Test
public void testJobStatusFlow() throws Exception {
HdfsApi hdfsApi = createNiceMock(HdfsApi.class);
expect(hdfsApi.copy(eq("/tmp/script.pig"), startsWith("/tmp/.pigjobs/"))).andReturn(true);
ByteArrayOutputStream do_stream = new ByteArrayOutputStream();
FSDataOutputStream stream = new FSDataOutputStream(do_stream);
expect(hdfsApi.create(anyString(), eq(true))).andReturn(stream);
replay(hdfsApi);
JobService.setHdfsApi(hdfsApi);
TempletonApi api = createNiceMock(TempletonApi.class);
jobService.getResourceManager().setTempletonApi(api);