use of com.nextdoor.bender.operation.json.value.DropArraysOperation in project bender by Nextdoor.
the class DropArraysMutatorTest method testMutatePayload.
@Test
public void testMutatePayload() throws JsonSyntaxException, IOException, OperationException {
JsonParser parser = new JsonParser();
JsonElement input = parser.parse(getResourceString("basic_input.json"));
String expectedOutput = getResourceString("basic_output_drop_arrays.json");
DummpyEvent devent = new DummpyEvent();
devent.payload = input.getAsJsonObject();
DropArraysOperation operation = new DropArraysOperation();
InternalEvent ievent = new InternalEvent("", null, 0);
ievent.setEventObj(devent);
operation.perform(ievent);
assertEquals(expectedOutput, input.toString());
}
Aggregations