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: build_tree_test.go
    path of file: ./repos/lazygit/pkg/gui/filetree
    
    the code of the file until where you have to start completion: package filetree

import (
	"testing"

	"github.com/jesseduffield/lazygit/pkg/commands/models"
	"github.com/stretchr/testify/assert"
)

func TestBuildTreeFromFiles(t *testing.T) {
	scenarios := []struct {
		name     string
		files    []*models.File
		expected *Node[models.File]
	}{
		{
			name:  "no files",
			files: []*models.File{},
			expected: &Node[models.File]{
				P
    
func TestBuildTreeFromFiles(t *testing.T) {
	scenarios := []struct {
		name     string
		files    []*models.File
		expected *Node[models.File]
	}{
		{
			name:  "no files",
			files: []*models.File{},
			expected: &Node[models.File]{
				Path:     "",
				Children: nil,
			},
		},
		{
			name: "files in same directory",
			files: []*models.File{
				{
					Name: "dir1/a",
				},
				{
					Name: "dir1/b",
				},
			},
			expected: &Node[models.File]{
				Path: "",
				Children: []*Node[models.File]{
					{
						Path: "dir1",
						Children: []*Node[models.File]{
							{
								File: &models.File{Name: "dir1/a"},
								Path: "dir1/a",
							},
							{
								File: &models.File{Name: "dir1/b"},
								Path: "dir1/b",
							},
						},
					},
				},
			},
		},
		{
			name: "paths that can be compressed",
			files: []*models.File{
				{
					Name: "dir1/dir3/a",
				},
				{
					Name: "dir2/dir4/b",
				},
			},
			expected: &Node[models.File]{
				Path: "",
				Children: []*Node[models.File]{
					{
						Path: "dir1/dir3",
						Children: []*Node[models.File]{
							{
								File: &models.File{Name: "dir1/dir3/a"},
								Path: "dir1/dir3/a",
							},
						},
						CompressionLevel: 1,
					},
					{
						Path: "dir2/dir4",
						Children: []*Node[models.File]{
							{
								File: &models.File{Name: "dir2/dir4/b"},
								Path: "dir2/dir4/b",
							},
						},
						CompressionLevel: 1,
					},
				},
			},
		},
		{
			name: "paths that can be sorted",
			files: []*models.File{
				{
					Name: "b",
				},
				{
					Name: "a",
				},
			},
			expected: &Node[models.File]{
				Path: "",
				Children: []*Node[models.File]{
					{
						File: &models.File{Name: "a"},
						Path: "a",
					},
					{
						File: &models.File{Name: "b"},
						Path: "b",
					},
				},
			},
		},
		{
			name: "paths that can be sorted including a merge conflict file",
			files: []*models.File{
				{
					Name: "b",
				},
				{
					Name:              "z",
					HasMergeConflicts: true,
				},
				{
					Name: "a",
				},
			},
			expected: &Node[models.File]{
				Path: "",
				// it is a little strange that we're not bubbling up our merge conflict
				// here but we are technically still in in tree mode and that's the rule
				Children: []*Node[models.File]{
					{
						File: &models.File{Name: "a"},
						Path: "a",
					},
					{
						File: &models.File{Name: "b"},
						Path: "b",
					},
					{
						File: &models.File{Name: "z", HasMergeConflicts: true},
						Path: "z",
					},
				},
			},
		},
	}

	for _, s := range scenarios {
		s := s
		t.Run(s.name, func(t *testing.T) {
			result := BuildTreeFromFiles(s.files)
			assert.EqualValues(t, s.expected, result)
		})
	}
}