//Help me to write test class for this class.
@RestResource(urlMapping='/updateCaseStatus/*')
global class HttpMethodsJiraToSF
{
@HttpPost
global static void getvaluefromjira() {
try{
RestRequest request = RestContext.request;
RestResponse res = RestContext.response;
// system.debug('--------------'+request.requestBody.toString());
String jSONRequestBody=request.requestBody.toString().trim();
system.debug('--------------'+request.requestBody.toString());
system.debug('--------------'+jSONRequestBody);
HttpMethodsJiraToSFRes.jira resJira = (HttpMethodsJiraToSFRes.jira)JSON.deserialize(jSONRequestBody,HttpMethodsJiraToSFRes.jira.class);
system.debug('--------------'+resJira.caseid);
system.debug('--------------'+resJira.Status);
case c=[select id,status from case where id =:resJira.caseid];
if(resJira.Status=='y')
c.status=resJira.Status;
update c;
}catch(Exception x)
{
system.debug('--------------'+x);
return;
}
}
}