@Override
    public ConfigDiff transaction(ConfigSource config, Control control) {
        if (previewResult == null) {
            throw new IllegalStateException("PreviewResult object must be set");
        }
        return resume(config.loadConfig(Task.class).dump(), previewResult.getSchema(), 1, control);
    }
This plugin is used for TestingEmbulk.InputBuilder.preview().
embulk-junit4/src/main/java/org/embulk/test/PreviewResultInputPlugin.java