@Test
public void testRegisterScript() throws Exception {

	PigResource resource= new PigResource();
	String str= "STORE E into '$output' using PigStorage(',');";
	InputStream input= new ByteArrayInputStream(str.getBytes("UTF-8"));
	Response resp= resource.registerScript("script.pig", input);
	Assert.assertEquals(resp.getStatus(), 200);
	
	input= new ByteArrayInputStream(str.getBytes("UTF-8"));
	try {
		resp= resource.registerScript("script.pig", input);
	} catch (Exception e) {
		Assert.assertNotNull(e);
	}
	
	
	str= "DUMP E";
	input= new ByteArrayInputStream(str.getBytes("UTF-8"));
	
	resp= resource.registerScript("script1.pig", input);
	Assert.assertEquals(resp.getStatus(), 400);
	
}