    @Test 
    public void testGetStatus() 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.getRequestStatus(requestId);
    	Assert.assertEquals(resp.getStatus(), 200);
    	
    	requestId= "abc";
    	try {
    		resp=  resource.getRequestStatus(requestId);
    	} catch (Exception e) {
    		Assert.assertNotNull(resp);
    	}
    	
    	requestId= UUID.randomUUID().toString();
    	fileSystem.mkdirs(new Path(PropertyLoader.getInstance().getProperty("requests.basepath") + requestId));
    	try {
    		resp=  resource.getRequestStatus(requestId);
    	} catch (Exception e) {
    		Assert.assertNotNull(e);
    	}
    }