// Path: src/main/java/com/ottogroup/bi/streaming/operator/json/JsonContentReference.java
// public class JsonContentReference implements Serializable {
// 
// 	private static final long serialVersionUID = -5075723737186875253L;
// 
// 	private String[] path = null;
// 	private JsonContentType contentType = null;
// 	private String conversionPattern = null;
// 	/** enforce strict evaluation and require the field to be present */
// 	private boolean required = false;
// 	
// 	public JsonContentReference() {		
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType) {
// 		this(path, contentType, false);
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType, final boolean required) {
// 		this.path = path;
// 		this.contentType = contentType;
// 		this.required = required;
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType, final String conversionPattern) {
// 		this.path = path;
// 		this.contentType = contentType;
// 		this.conversionPattern = conversionPattern;
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType, final String conversionPattern, final boolean required) {
// 		this.path = path;
// 		this.contentType = contentType;
// 		this.conversionPattern = conversionPattern;
// 		this.required = required;
// 	}
// 
// 	public String[] getPath() {
// 		return path;
// 	}
// 
// 	public void setPath(String[] path) {
// 		this.path = path;
// 	}
// 
// 	public JsonContentType getContentType() {
// 		return contentType;
// 	}
// 
// 	public void setContentType(JsonContentType contentType) {
// 		this.contentType = contentType;
// 	}
// 
// 	public String getConversionPattern() {
// 		return conversionPattern;
// 	}
// 
// 	public void setConversionPattern(String conversionPattern) {
// 		this.conversionPattern = conversionPattern;
// 	}
// 
// 	public boolean isRequired() {
// 		return required;
// 	}
// 
// 	public void setRequired(boolean required) {
// 		this.required = required;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/com/ottogroup/bi/streaming/operator/json/JsonContentType.java
// public enum JsonContentType implements Serializable {
// 	STRING, INTEGER, DOUBLE, TIMESTAMP, BOOLEAN 
// }


import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.sling.commons.json.JSONObject;
import org.junit.Assert;
import org.junit.Test;
import com.ottogroup.bi.streaming.operator.json.JsonContentReference;
import com.ottogroup.bi.streaming.operator.json.JsonContentType;
	public void testDecodeBase64_withNullInputString() throws Exception {
		List<Base64ContentDecoderConfiguration> input = new ArrayList<>();
		input.add(new Base64ContentDecoderConfiguration(new JsonContentReference(new String[]{"test","path"}, JsonContentType.BOOLEAN, false), "", null, false));
		Base64ContentDecoder decoder = new Base64ContentDecoder(input);
		Assert.assertEquals("",decoder.decodeBase64(null, "prefix", "UTF-8"));
	}

	/**
	 * Test case for {@link Base64ContentDecoder#decodeBase64(String, String, String)} being provided a base64 string and a prefix
	 * where the base64 string consists only of the prefix
	 */
	@Test
	public void testDecodeBase64_withPrefixOnlyInputString() throws Exception {
		List<Base64ContentDecoderConfiguration> input = new ArrayList<>();
		input.add(new Base64ContentDecoderConfiguration(new JsonContentReference(new String[]{"test","path"}, JsonContentType.BOOLEAN, false), "", null, false));
		Base64ContentDecoder decoder = new Base64ContentDecoder(input);
		Assert.assertEquals("",decoder.decodeBase64("prefix", "prefix", "UTF-8"));
	}

	/**
	 * Test case for {@link Base64ContentDecoder#decodeBase64(String, String, String)} being provided a base64 string showing 
	 * a prefix
	 */
	@Test
	public void testDecodeBase64_withInputStringShowingPrefix() throws Exception {
		final String expected = "{\"result_size\":[\"1\"],\"product_id\":[\"XYZ123\"],\"cust_id\":[\"meMyselfAndI\"],\"shop_id\":[\"shop.com\"]}";
		List<Base64ContentDecoderConfiguration> input = new ArrayList<>();
		input.add(new Base64ContentDecoderConfiguration(new JsonContentReference(new String[]{"test","path"}, JsonContentType.BOOLEAN, false), "", null, false));
		Base64ContentDecoder decoder = new Base64ContentDecoder(input);
		Assert.assertEquals(expected,
// Path: src/main/java/com/ottogroup/bi/streaming/operator/json/JsonContentReference.java
// public class JsonContentReference implements Serializable {
// 
// 	private static final long serialVersionUID = -5075723737186875253L;
// 
// 	private String[] path = null;
// 	private JsonContentType contentType = null;
// 	private String conversionPattern = null;
// 	/** enforce strict evaluation and require the field to be present */
// 	private boolean required = false;
// 	
// 	public JsonContentReference() {		
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType) {
// 		this(path, contentType, false);
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType, final boolean required) {
// 		this.path = path;
// 		this.contentType = contentType;
// 		this.required = required;
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType, final String conversionPattern) {
// 		this.path = path;
// 		this.contentType = contentType;
// 		this.conversionPattern = conversionPattern;
// 	}
// 	
// 	public JsonContentReference(final String[] path, final JsonContentType contentType, final String conversionPattern, final boolean required) {
// 		this.path = path;
// 		this.contentType = contentType;
// 		this.conversionPattern = conversionPattern;
// 		this.required = required;
// 	}
// 
// 	public String[] getPath() {
// 		return path;
// 	}
// 
// 	public void setPath(String[] path) {
// 		this.path = path;
// 	}
// 
// 	public JsonContentType getContentType() {
// 		return contentType;
// 	}
// 
// 	public void setContentType(JsonContentType contentType) {
// 		this.contentType = contentType;
// 	}
// 
// 	public String getConversionPattern() {
// 		return conversionPattern;
// 	}
// 
// 	public void setConversionPattern(String conversionPattern) {
// 		this.conversionPattern = conversionPattern;
// 	}
// 
// 	public boolean isRequired() {
// 		return required;
// 	}
// 
// 	public void setRequired(boolean required) {
// 		this.required = required;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/com/ottogroup/bi/streaming/operator/json/JsonContentType.java
// public enum JsonContentType implements Serializable {
// 	STRING, INTEGER, DOUBLE, TIMESTAMP, BOOLEAN 
// }


// Path: src/test/java/com/ottogroup/bi/streaming/operator/json/decode/Base64ContentDecoderTest.java
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.sling.commons.json.JSONObject;
import org.junit.Assert;
import org.junit.Test;
import com.ottogroup.bi.streaming.operator.json.JsonContentReference;
import com.ottogroup.bi.streaming.operator.json.JsonContentType;

	public void testDecodeBase64_withNullInputString() throws Exception {
		List<Base64ContentDecoderConfiguration> input = new ArrayList<>();
		input.add(new Base64ContentDecoderConfiguration(new JsonContentReference(new String[]{"test","path"}, JsonContentType.BOOLEAN, false), "", null, false));
		Base64ContentDecoder decoder = new Base64ContentDecoder(input);
		Assert.assertEquals("",decoder.decodeBase64(null, "prefix", "UTF-8"));
	}

	/**
	 * Test case for {@link Base64ContentDecoder#decodeBase64(String, String, String)} being provided a base64 string and a prefix
	 * where the base64 string consists only of the prefix
	 */
	@Test
	public void testDecodeBase64_withPrefixOnlyInputString() throws Exception {
		List<Base64ContentDecoderConfiguration> input = new ArrayList<>();
		input.add(new Base64ContentDecoderConfiguration(new JsonContentReference(new String[]{"test","path"}, JsonContentType.BOOLEAN, false), "", null, false));
		Base64ContentDecoder decoder = new Base64ContentDecoder(input);
		Assert.assertEquals("",decoder.decodeBase64("prefix", "prefix", "UTF-8"));
	}

	/**
	 * Test case for {@link Base64ContentDecoder#decodeBase64(String, String, String)} being provided a base64 string showing 
	 * a prefix
	 */
	@Test
	public void testDecodeBase64_withInputStringShowingPrefix() throws Exception {
		final String expected = "{\"result_size\":[\"1\"],\"product_id\":[\"XYZ123\"],\"cust_id\":[\"meMyselfAndI\"],\"shop_id\":[\"shop.com\"]}";
		List<Base64ContentDecoderConfiguration> input = new ArrayList<>();
		input.add(new Base64ContentDecoderConfiguration(new JsonContentReference(new String[]{"test","path"}, JsonContentType.BOOLEAN, false), "", null, false));
		Base64ContentDecoder decoder = new Base64ContentDecoder(input);
		Assert.assertEquals(expected,
				decoder.decodeBase64(