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: cadvisor_stats_provider_test.go
    path of file: ./repos/kubernetes/pkg/kubelet/stats
    
    the code of the file until where you have to start completion: /*
Copyright 2017 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package stats

import (
	"context"
	"runtime"
	"testing"

	"github.com/golang/mock/gomock"
	cadvisorapiv2 "github.com/google/cadvisor/info/v2"
	"github.com/stretchr/testify/assert"

	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	utilfeature "k8s.io/apiserver/pkg/util/feature"
	featuregatetesting "k8s.io/component-base/featuregate/testing"
	runtimeapi "k8s.io/cri-api/pkg/apis/runtime/v1"
	statsapi "k8s.io/kubelet/pkg/apis/stats/v1alpha1"
	kubelettypes "k8s.io/kubelet/pkg/types"
	"k8s.io/kubernetes/pkg/features"
	cadvisortest "k8s.io/kubernetes/pkg/kubelet/cadvisor/testing"
	kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
	containertest "k8s.io/kubernetes/pkg/kubelet/container/testing"
	"k8s.io/kubernetes/pkg/kubelet/kuberuntime"
	serverstats "k8s.io/kubernetes/pkg/kubelet/server/stats"
	statustest "k8s.io/kubernetes/pkg/kubelet/status/testing"
	"k8s.io/kubernetes/pkg/volume"
)

func TestFilterTerminatedContainerInfoAndAssembleByPodCgroupKey(t *testing.T) {
	const (
		seedPastPod0Infra      = 1000
		seedPastPod0Container0 = 2000
		seedPod0Infra          = 3000
		seedPod0Container0     = 4000
	)
	const (
		namespace = "test"
		pName0    = "pod0"
		cName00   = "c0"
		pName1    = "pod1"
		cName11   = "c1"
		pName2    = "pod2"
		cName22   = "c2"
		cName222  = "c222"
	)
	infos := map[string]cadvisorapiv2.Conta
    
func TestCadvisorSplitImagesFsStats(t *testing.T) {
	ctx := context.Background()
	mockCtrl := gomock.NewController(t)
	defer mockCtrl.Finish()
	var (
		assert       = assert.New(t)
		mockCadvisor = cadvisortest.NewMockInterface(mockCtrl)
		mockRuntime  = containertest.NewMockRuntime(mockCtrl)

		seed            = 1000
		imageFsInfo     = getTestFsInfo(seed)
		containerSeed   = 1001
		containerFsInfo = getTestFsInfo(containerSeed)
	)
	imageFsInfoCRI := &runtimeapi.FilesystemUsage{
		Timestamp:  imageFsInfo.Timestamp.Unix(),
		FsId:       &runtimeapi.FilesystemIdentifier{Mountpoint: "images"},
		UsedBytes:  &runtimeapi.UInt64Value{Value: imageFsInfo.Usage},
		InodesUsed: &runtimeapi.UInt64Value{Value: *imageFsInfo.Inodes},
	}
	containerFsInfoCRI := &runtimeapi.FilesystemUsage{
		Timestamp:  containerFsInfo.Timestamp.Unix(),
		FsId:       &runtimeapi.FilesystemIdentifier{Mountpoint: "containers"},
		UsedBytes:  &runtimeapi.UInt64Value{Value: containerFsInfo.Usage},
		InodesUsed: &runtimeapi.UInt64Value{Value: *containerFsInfo.Inodes},
	}
	imageFsInfoResponse := &runtimeapi.ImageFsInfoResponse{
		ImageFilesystems:     []*runtimeapi.FilesystemUsage{imageFsInfoCRI},
		ContainerFilesystems: []*runtimeapi.FilesystemUsage{containerFsInfoCRI},
	}

	mockCadvisor.EXPECT().ImagesFsInfo().Return(imageFsInfo, nil)
	mockCadvisor.EXPECT().ContainerFsInfo().Return(containerFsInfo, nil)
	mockRuntime.EXPECT().ImageFsInfo(ctx).Return(imageFsInfoResponse, nil)
	defer featuregatetesting.SetFeatureGateDuringTest(t, utilfeature.DefaultFeatureGate, features.KubeletSeparateDiskGC, true)()

	provider := newCadvisorStatsProvider(mockCadvisor, &fakeResourceAnalyzer{}, mockRuntime, nil, NewFakeHostStatsProvider())
	stats, containerfs, err := provider.ImageFsStats(ctx)
	assert.NoError(err)

	assert.Equal(imageFsInfo.Timestamp, stats.Time.Time)
	assert.Equal(imageFsInfo.Available, *stats.AvailableBytes)
	assert.Equal(imageFsInfo.Capacity, *stats.CapacityBytes)
	assert.Equal(imageFsInfo.InodesFree, stats.InodesFree)
	assert.Equal(imageFsInfo.Inodes, stats.Inodes)
	assert.Equal(*imageFsInfo.Inodes-*imageFsInfo.InodesFree, *stats.InodesUsed)

	assert.Equal(containerFsInfo.Timestamp, containerfs.Time.Time)
	assert.Equal(containerFsInfo.Available, *containerfs.AvailableBytes)
	assert.Equal(containerFsInfo.Capacity, *containerfs.CapacityBytes)
	assert.Equal(containerFsInfo.InodesFree, containerfs.InodesFree)
	assert.Equal(containerFsInfo.Inodes, containerfs.Inodes)
	assert.Equal(*containerFsInfo.Inodes-*containerFsInfo.InodesFree, *containerfs.InodesUsed)

}