You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: serializer_test.go
    path of file: ./repos/wal-g/internal
    
    the code of the file until where you have to start completion: package internal_test

import (
	"github.com/stretchr/testify/assert"

	"testing"

	conf "github.com/wal-g/wal-g/internal/config"

	"github.com/spf13/viper"
	"github.com/wal-g/wal-g/internal"
)

func TestDtoSerializer_NewDtoSerializer(t *testing.T) {
	tests := []struct {
		name                       string
		serializerTypeSettingValue string
		expectedDto                internal.DtoSerializer
		expectedErrText            string
	}{
		{
			name:                       "ReguralJSON_if_json_default",
			serializerTypeSettingValue: "json_default",
			expectedDto:                internal.RegularJSON{},
			expectedErrText:            "",
		},
		{
			name:                       "StreamedJSON_if_json_streamed",
			serializerTypeSettingValue: "json_streamed",
			expectedDto:                internal.StreamedJSON{},
			expectedErrText:            "",
		},
		{
			name:                       "error_if_unknown_type",
			serializerTypeSettingValue: "ff",
			expectedDto:                nil,
			expectedErrText:            "undefined dto serializer type: ff
    
func TestDtoSerializer_NewDtoSerializer(t *testing.T) {
	tests := []struct {
		name                       string
		serializerTypeSettingValue string
		expectedDto                internal.DtoSerializer
		expectedErrText            string
	}{
		{
			name:                       "ReguralJSON_if_json_default",
			serializerTypeSettingValue: "json_default",
			expectedDto:                internal.RegularJSON{},
			expectedErrText:            "",
		},
		{
			name:                       "StreamedJSON_if_json_streamed",
			serializerTypeSettingValue: "json_streamed",
			expectedDto:                internal.StreamedJSON{},
			expectedErrText:            "",
		},
		{
			name:                       "error_if_unknown_type",
			serializerTypeSettingValue: "ff",
			expectedDto:                nil,
			expectedErrText:            "undefined dto serializer type: ff",
		},
	}

	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			viper.Set(conf.SerializerTypeSetting, tt.serializerTypeSettingValue)

			dto, err := internal.NewDtoSerializer()

			if tt.expectedErrText == "" {
				assert.NoError(t, err)
			} else {
				assert.EqualError(t, err, tt.expectedErrText, "Errors not same")
			}
			assert.Equalf(t, tt.expectedDto, dto, "Expected different dto")
		})
	}
}