@Test 
public void testGetStats() throws Exception {

	PigResource resource= new PigResource();
	PigRequestStats stats= new PigRequestStats(15, 14, null, 5);
	stats.setStatus("STATUS");
	
	String requestId= UUID.randomUUID().toString();
	String path= PropertyLoader.getInstance().getProperty("requests.basepath") + requestId 
			+ "/stats";
	
	PigUtils.writeStatsFile(new Path(path), stats);
	Response resp=  resource.getRequestStats(requestId);
	Assert.assertEquals(resp.getStatus(), 200);
	
	requestId= "abc";
	try {
		resp=  resource.getRequestStats(requestId);
	} catch (Exception e) {
		Assert.assertNotNull(resp);
	}
	
	requestId= UUID.randomUUID().toString();
	fileSystem.mkdirs(new Path(PropertyLoader.getInstance().getProperty("requests.basepath") + requestId));
	try {
		resp=  resource.getRequestStats(requestId);
	} catch (Exception e) {
		Assert.assertNotNull(e);
	}
}