package processors.availability;

import com.fasterxml.jackson.databind.JsonNode;
import converters.JsonConverter;
import datamodel.HttpResponseForAvailability;
import processors.Processor;

public class HttpBodyFilter implements Processor {

    @Override
    public String process(String textToProcess, JsonNode configuration) throws Throwable {
        HttpResponseForAvailability httpResponseForAvailability = JsonConverter.jsonStringToObject(textToProcess, HttpResponseForAvailability.class);
        return httpResponseForAvailability.getBody();
    }
}

@@ -75,16 +75,320 @@
 onNode;%0A
+import com.fasterxml.jackson.databind.ObjectMapper;%0Aimport com.fasterxml.jackson.databind.ObjectWriter;%0Aimport com.fasterxml.jackson.databind.ser.FilterProvider;%0Aimport com.fasterxml.jackson.databind.ser.impl.SimpleBeanPropertyFilter;%0Aimport com.fasterxml.jackson.databind.ser.impl.SimpleFilterProvider;%0A
 import c
@@ -408,24 +408,24 @@
 nConverter;%0A
-
 import datam
@@ -795,24 +795,25 @@
 class);%0A
+%0A
         
 return h
@@ -808,15 +808,374 @@
     
-return 
+ObjectMapper mapper = new ObjectMapper();%0A        String%5B%5D ignorableFieldNames = %7B %22httpStatusCode%22%7D;%0A        FilterProvider filters = new SimpleFilterProvider()%0A                .addFilter(%22httpFilter%22, SimpleBeanPropertyFilter.serializeAllExcept(ignorableFieldNames));%0A        ObjectWriter writer = mapper.writer(filters);%0A        return  writer.writeValueAsString(
 http
@@ -1201,17 +1201,8 @@
 lity
-.getBody(
 );%0A 

Enhance processor for http response body.