func TestFunctionGetBatchConverterFunction(t *testing.T) {
	t.Log("Returns a BatchConverter functions for multiple Event conversion")
	csvFn, err := GetBatchConverterFunction("csv")
	if err != nil {
		t.Errorf("Converter csv should work")
	}
	if reflect.ValueOf(ConvertBatchCSV).Pointer() != reflect.ValueOf(csvFn).Pointer() {
		t.Errorf("Not expected csv function was returned")
	}
	jsonFn, err := GetBatchConverterFunction("json")
	if err != nil {
		t.Errorf("Converter json should work")
	}
	if reflect.ValueOf(ConvertBatchJSON).Pointer() != reflect.ValueOf(jsonFn).Pointer() {
		t.Errorf("Not expected json function was returned")
	}
	_, err = GetBatchConverterFunction("CSV")
	if err == nil {
		t.Errorf("Only lowercase FileFormat is supported")
	}
	_, err = GetBatchConverterFunction("")
	if err == nil {
		t.Errorf("Empty or not existing converter should return with error")
	}
}
Returns a BatchConverter functions for multiple Event conversion
package dialects
import (
	"encoding/json"
	"reflect"
	"strings"
	"testing"
)
func TestConvertEpochIntoIsoformat(t *testing.T) {
	cases := []struct {
		Input    uint64
		Expected string
	}{
		{1454681104, "2016-02-05 14:05:04"},
		{1454681104000, "48067-01-03 20:26:40"},
		{1454681104000000, "46098979-02-11 20:26:40"}}
	for _, c := range cases {
		if ts := ConvertIsoformat(c.Input); ts != c.Expected {
			t.Errorf("Expected timestamp was %s but it was %s instead.", c.Expected, ts)
		}
	}
}
func TestFunctionGetConverterFunction(t *testing.T) {
	t.Log("Returns a Converter functions for single Event conversion")
	csvFn, err := GetConverterFunction("csv")
	if err != nil {
		t.Errorf("Converter csv should work")
	}
	if reflect.ValueOf(ConvertCSV).Pointer() != reflect.ValueOf(csvFn).Pointer() {
		t.Errorf("Not expected csv function was returned")
	}
	jsonFn, err := GetConverterFunction("json")
	if err != nil {
		t.Errorf("Converter json should work")
	}
	if reflect.ValueOf(ConvertJSON).Pointer() != reflect.ValueOf(jsonFn).Pointer() {
		t.Errorf("Not expected json function was returned")
	}
	_, err = GetConverterFunction("CSV")
	if err == nil {
		t.Errorf("Only lowercase FileFormat is supported")
	}
	_, err = GetConverterFunction("")
	if err == nil {
		t.Errorf("Empty or not existing converter should return with error")
	}
}