}
@Test
public void testSubmitJobUsernameProvided() 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);