@Test 
public void testGetOutpu() throws Exception {

	PigResource resource= new PigResource();
	String requestId= UUID.randomUUID().toString();
	String inputString= "1,2,3,4,5";
	String path= PropertyLoader.getInstance().getProperty("requests.basepath") + requestId 
			+ "/output/part-00000";
	
	BufferedWriter writer= new BufferedWriter(
			new OutputStreamWriter(fileSystem.create(new Path(path), false)));
iter.write(inputString);
iter.close();
	Response resp=  resource.getOutput(requestId);
	Assert.assertEquals(resp.getStatus(), 200);
	
	StreamingPigOutputImpl out= (StreamingPigOutputImpl) resp.getEntity();
	ByteArrayOutputStream output= new ByteArrayOutputStream();
	out.write(output);
	
	String outStr= output.toString();
	Assert.assertEquals(outStr.contains("1,2,3,4"), true);
	
	requestId= "abc";
	try {
		resp=  resource.getOutput(requestId);
	} catch (Exception e) {
		Assert.assertNotNull(resp);
	}
}