// Path: hangout-filters/hangout-filters-remove/src/main/java/com/ctrip/ops/sysdev/filters/Remove.java
// @SuppressWarnings("ALL")
// public class Remove extends BaseFilter {
//     public Remove(Map config) {
//         super(config);
//     }
// 
//     private ArrayList<FieldDeleter> fields;
// 
//     protected void prepare() {
// 
//         this.fields = new ArrayList<>();
//         for (String field : (ArrayList<String>) config.get("fields")) {
//             this.fields.add(FieldDeleter.getFieldDeleter(field));
//         }
//     }
// 
//     @Override
//     protected Map filter(final Map event) {
//         for (FieldDeleter t : this.fields) {
//             t.delete(event);
//         }
// 
//         return event;
//     }
// }


import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ctrip.ops.sysdev.filters.Remove;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.yaml.snakeyaml.Yaml;
package com.ctrip.ops.sysdev.test;



public class TestRemoveFilter {
    @Test
    public void testRemoveFilter() {
        String c = String.format("%s\n%s\n%s\n%s",
                "fields:",
                "  - gender",
                "  - '[name][first]'",
                "  - '[value][list][value1]'"
        );
        Yaml yaml = new Yaml();
        Map config = (Map) yaml.load(c);
        Assert.assertNotNull(config);

// Path: hangout-filters/hangout-filters-remove/src/main/java/com/ctrip/ops/sysdev/filters/Remove.java
// @SuppressWarnings("ALL")
// public class Remove extends BaseFilter {
//     public Remove(Map config) {
//         super(config);
//     }
// 
//     private ArrayList<FieldDeleter> fields;
// 
//     protected void prepare() {
// 
//         this.fields = new ArrayList<>();
//         for (String field : (ArrayList<String>) config.get("fields")) {
//             this.fields.add(FieldDeleter.getFieldDeleter(field));
//         }
//     }
// 
//     @Override
//     protected Map filter(final Map event) {
//         for (FieldDeleter t : this.fields) {
//             t.delete(event);
//         }
// 
//         return event;
//     }
// }


// Path: hangout-filters/hangout-filters-remove/src/test/java/com/ctrip/ops/sysdev/test/TestRemoveFilter.java
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ctrip.ops.sysdev.filters.Remove;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.yaml.snakeyaml.Yaml;

package com.ctrip.ops.sysdev.test;



public class TestRemoveFilter {
    @Test
    public void testRemoveFilter() {
        String c = String.format("%s\n%s\n%s\n%s",
                "fields:",
                "  - gender",
                "  - '[name][first]'",
                "  - '[value][list][value1]'"
        );
        Yaml yaml = new Yaml();
        Map config = (Map) yaml.load(c);
        Assert.assertNotNull(config);

        Remove removeFilter = new Remove(config);