Repository: kubernetes-sigs/kube-scheduler-simulator
Pull request #304 (2023-06-06 11:33:00)

Refactor snapshot service
<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide/first-contribution.md#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. For reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
5. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->

#### What type of PR is this?
/area simulator
/kind cleanup
<!--
Add related area tag(s):
/area web
/area simulator
/area scenario

Add one of the following kinds:
/kind bug
/kind cleanup
/kind documentation
/kind feature

Optionally add one or more of the following kinds if applicable:
/kind api-change
/kind deprecation
/kind failing-test
/kind flake
/kind regression
-->

#### What this PR does / why we need it:
- Remove each resource service from the snapshot service and refactor the test for it.

#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Part of #139 #233 

#### Special notes for your reviewer:
This PR does not delete each resource service. It will be handled in a separate PR.

/label tide/merge-method-squash


k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/kube-scheduler-simulator/pull/304#" title="Author self-approved">196Ikuchil</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fkube-scheduler-simulator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/OWNERS)~~ [196Ikuchil]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->
k8s-ci-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/kubernetes-sigs/kube-scheduler-simulator/pull/304#" title="Author self-approved">196Ikuchil</a>*, *<a href="https://github.com/kubernetes-sigs/kube-scheduler-simulator/pull/304#pullrequestreview-1492269050" title="Approved">sanposhiho</a>*

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=kubernetes-sigs%2Fkube-scheduler-simulator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/kubernetes-sigs/kube-scheduler-simulator/blob/master/OWNERS)~~ [196Ikuchil,sanposhiho]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/simulator/server/di/di.go b/simulator/server/di/di.go
index ae6026c2..093a700d 100644
--- a/simulator/server/di/di.go
+++ b/simulator/server/di/di.go
@@ -66,11 +66,11 @@ func NewDIContainer(
 	if err != nil {
 		return nil, xerrors.Errorf("initialize reset service: %w", err)
 	}
-	snapshotSvc := snapshot.NewService(client, c.podService, c.nodeService, c.pvService, c.pvcService, c.storageClassService, c.priorityClassService, c.schedulerService)
+	snapshotSvc := snapshot.NewService(client, c.schedulerService)
 	c.snapshotService = snapshotSvc
 	if externalImportEnabled {
-		clusterExportSvc := createReplicateServiceForImportClusterResourceService(externalClient, c.schedulerService)
-		c.importClusterResourceService = clusterresourceimporter.NewService(snapshotSvc, clusterExportSvc)
+		extSnapshotSvc := snapshot.NewService(externalClient, c.schedulerService)
+		c.importClusterResourceService = clusterresourceimporter.NewService(snapshotSvc, extSnapshotSvc)
 	}
 	c.resourceWatcherService = resourcewatcher.NewService(client)
 
@@ -137,16 +137,3 @@ func (c *Container) ResourceWatcherService() ResourceWatcherService {
 func (c *Container) ExtenderService() ExtenderService {
 	return c.schedulerService.ExtenderService()
 }
-
-// createReplicateServiceForImportClusterResourceService creates each services
-// that will be used for the ExportService for a target cluster.
-func createReplicateServiceForImportClusterResourceService(externalClient clientset.Interface, schedulerService SchedulerService) *snapshot.Service {
-	pvService := persistentvolume.NewPersistentVolumeService(externalClient)
-	pvcService := persistentvolumeclaim.NewPersistentVolumeClaimService(externalClient)
-	storageClassService := storageclass.NewStorageClassService(externalClient)
-
-	podService := pod.NewPodService(externalClient)
-	nodeService := node.NewNodeService(externalClient, podService)
-	priorityClassService := priorityclass.NewPriorityClassService(externalClient)
-	return snapshot.NewService(externalClient, podService, nodeService, pvService, pvcService, storageClassService, priorityClassService, schedulerService)
-}
diff --git a/simulator/snapshot/mock_snapshot/node.go b/simulator/snapshot/mock_snapshot/node.go
deleted file mode 100644
index 2bad896a..00000000
--- a/simulator/snapshot/mock_snapshot/node.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: NodeService)
-
-// Package mock_snapshot is a generated GoMock package.
-package mock_snapshot
-
-import (
-	context "context"
-	reflect "reflect"
-
-	gomock "github.com/golang/mock/gomock"
-	v1 "k8s.io/api/core/v1"
-	v10 "k8s.io/client-go/applyconfigurations/core/v1"
-)
-
-// MockNodeService is a mock of NodeService interface.
-type MockNodeService struct {
-	ctrl     *gomock.Controller
-	recorder *MockNodeServiceMockRecorder
-}
-
-// MockNodeServiceMockRecorder is the mock recorder for MockNodeService.
-type MockNodeServiceMockRecorder struct {
-	mock *MockNodeService
-}
-
-// NewMockNodeService creates a new mock instance.
-func NewMockNodeService(ctrl *gomock.Controller) *MockNodeService {
-	mock := &MockNodeService{ctrl: ctrl}
-	mock.recorder = &MockNodeServiceMockRecorder{mock}
-	return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockNodeService) EXPECT() *MockNodeServiceMockRecorder {
-	return m.recorder
-}
-
-// Apply mocks base method.
-func (m *MockNodeService) Apply(arg0 context.Context, arg1 *v10.NodeApplyConfiguration) (*v1.Node, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Apply", arg0, arg1)
-	ret0, _ := ret[0].(*v1.Node)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Apply indicates an expected call of Apply.
-func (mr *MockNodeServiceMockRecorder) Apply(arg0, arg1 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockNodeService)(nil).Apply), arg0, arg1)
-}
-
-// List mocks base method.
-func (m *MockNodeService) List(arg0 context.Context) (*v1.NodeList, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "List", arg0)
-	ret0, _ := ret[0].(*v1.NodeList)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockNodeServiceMockRecorder) List(arg0 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNodeService)(nil).List), arg0)
-}
diff --git a/simulator/snapshot/mock_snapshot/pod.go b/simulator/snapshot/mock_snapshot/pod.go
deleted file mode 100644
index 90576a26..00000000
--- a/simulator/snapshot/mock_snapshot/pod.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: PodService)
-
-// Package mock_snapshot is a generated GoMock package.
-package mock_snapshot
-
-import (
-	context "context"
-	reflect "reflect"
-
-	gomock "github.com/golang/mock/gomock"
-	v1 "k8s.io/api/core/v1"
-	v10 "k8s.io/client-go/applyconfigurations/core/v1"
-)
-
-// MockPodService is a mock of PodService interface.
-type MockPodService struct {
-	ctrl     *gomock.Controller
-	recorder *MockPodServiceMockRecorder
-}
-
-// MockPodServiceMockRecorder is the mock recorder for MockPodService.
-type MockPodServiceMockRecorder struct {
-	mock *MockPodService
-}
-
-// NewMockPodService creates a new mock instance.
-func NewMockPodService(ctrl *gomock.Controller) *MockPodService {
-	mock := &MockPodService{ctrl: ctrl}
-	mock.recorder = &MockPodServiceMockRecorder{mock}
-	return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockPodService) EXPECT() *MockPodServiceMockRecorder {
-	return m.recorder
-}
-
-// Apply mocks base method.
-func (m *MockPodService) Apply(arg0 context.Context, arg1 string, arg2 *v10.PodApplyConfiguration) (*v1.Pod, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Apply", arg0, arg1, arg2)
-	ret0, _ := ret[0].(*v1.Pod)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Apply indicates an expected call of Apply.
-func (mr *MockPodServiceMockRecorder) Apply(arg0, arg1, arg2 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPodService)(nil).Apply), arg0, arg1, arg2)
-}
-
-// List mocks base method.
-func (m *MockPodService) List(arg0 context.Context, arg1 string) (*v1.PodList, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "List", arg0, arg1)
-	ret0, _ := ret[0].(*v1.PodList)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockPodServiceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPodService)(nil).List), arg0, arg1)
-}
diff --git a/simulator/snapshot/mock_snapshot/priorityclass.go b/simulator/snapshot/mock_snapshot/priorityclass.go
deleted file mode 100644
index edae629d..00000000
--- a/simulator/snapshot/mock_snapshot/priorityclass.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: PriorityClassService)
-
-// Package mock_snapshot is a generated GoMock package.
-package mock_snapshot
-
-import (
-	context "context"
-	reflect "reflect"
-
-	gomock "github.com/golang/mock/gomock"
-	v1 "k8s.io/api/scheduling/v1"
-	v10 "k8s.io/client-go/applyconfigurations/scheduling/v1"
-)
-
-// MockPriorityClassService is a mock of PriorityClassService interface.
-type MockPriorityClassService struct {
-	ctrl     *gomock.Controller
-	recorder *MockPriorityClassServiceMockRecorder
-}
-
-// MockPriorityClassServiceMockRecorder is the mock recorder for MockPriorityClassService.
-type MockPriorityClassServiceMockRecorder struct {
-	mock *MockPriorityClassService
-}
-
-// NewMockPriorityClassService creates a new mock instance.
-func NewMockPriorityClassService(ctrl *gomock.Controller) *MockPriorityClassService {
-	mock := &MockPriorityClassService{ctrl: ctrl}
-	mock.recorder = &MockPriorityClassServiceMockRecorder{mock}
-	return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockPriorityClassService) EXPECT() *MockPriorityClassServiceMockRecorder {
-	return m.recorder
-}
-
-// Apply mocks base method.
-func (m *MockPriorityClassService) Apply(arg0 context.Context, arg1 *v10.PriorityClassApplyConfiguration) (*v1.PriorityClass, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Apply", arg0, arg1)
-	ret0, _ := ret[0].(*v1.PriorityClass)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Apply indicates an expected call of Apply.
-func (mr *MockPriorityClassServiceMockRecorder) Apply(arg0, arg1 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPriorityClassService)(nil).Apply), arg0, arg1)
-}
-
-// List mocks base method.
-func (m *MockPriorityClassService) List(arg0 context.Context) (*v1.PriorityClassList, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "List", arg0)
-	ret0, _ := ret[0].(*v1.PriorityClassList)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockPriorityClassServiceMockRecorder) List(arg0 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPriorityClassService)(nil).List), arg0)
-}
diff --git a/simulator/snapshot/mock_snapshot/pv.go b/simulator/snapshot/mock_snapshot/pv.go
deleted file mode 100644
index 7e76658d..00000000
--- a/simulator/snapshot/mock_snapshot/pv.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: PersistentVolumeService)
-
-// Package mock_snapshot is a generated GoMock package.
-package mock_snapshot
-
-import (
-	context "context"
-	reflect "reflect"
-
-	gomock "github.com/golang/mock/gomock"
-	v1 "k8s.io/api/core/v1"
-	v10 "k8s.io/client-go/applyconfigurations/core/v1"
-)
-
-// MockPersistentVolumeService is a mock of PersistentVolumeService interface.
-type MockPersistentVolumeService struct {
-	ctrl     *gomock.Controller
-	recorder *MockPersistentVolumeServiceMockRecorder
-}
-
-// MockPersistentVolumeServiceMockRecorder is the mock recorder for MockPersistentVolumeService.
-type MockPersistentVolumeServiceMockRecorder struct {
-	mock *MockPersistentVolumeService
-}
-
-// NewMockPersistentVolumeService creates a new mock instance.
-func NewMockPersistentVolumeService(ctrl *gomock.Controller) *MockPersistentVolumeService {
-	mock := &MockPersistentVolumeService{ctrl: ctrl}
-	mock.recorder = &MockPersistentVolumeServiceMockRecorder{mock}
-	return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockPersistentVolumeService) EXPECT() *MockPersistentVolumeServiceMockRecorder {
-	return m.recorder
-}
-
-// Apply mocks base method.
-func (m *MockPersistentVolumeService) Apply(arg0 context.Context, arg1 *v10.PersistentVolumeApplyConfiguration) (*v1.PersistentVolume, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Apply", arg0, arg1)
-	ret0, _ := ret[0].(*v1.PersistentVolume)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Apply indicates an expected call of Apply.
-func (mr *MockPersistentVolumeServiceMockRecorder) Apply(arg0, arg1 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPersistentVolumeService)(nil).Apply), arg0, arg1)
-}
-
-// List mocks base method.
-func (m *MockPersistentVolumeService) List(arg0 context.Context) (*v1.PersistentVolumeList, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "List", arg0)
-	ret0, _ := ret[0].(*v1.PersistentVolumeList)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockPersistentVolumeServiceMockRecorder) List(arg0 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPersistentVolumeService)(nil).List), arg0)
-}
diff --git a/simulator/snapshot/mock_snapshot/pvc.go b/simulator/snapshot/mock_snapshot/pvc.go
deleted file mode 100644
index 65ec5d19..00000000
--- a/simulator/snapshot/mock_snapshot/pvc.go
+++ /dev/null
@@ -1,82 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: PersistentVolumeClaimService)
-
-// Package mock_snapshot is a generated GoMock package.
-package mock_snapshot
-
-import (
-	context "context"
-	reflect "reflect"
-
-	gomock "github.com/golang/mock/gomock"
-	v1 "k8s.io/api/core/v1"
-	v10 "k8s.io/client-go/applyconfigurations/core/v1"
-)
-
-// MockPersistentVolumeClaimService is a mock of PersistentVolumeClaimService interface.
-type MockPersistentVolumeClaimService struct {
-	ctrl     *gomock.Controller
-	recorder *MockPersistentVolumeClaimServiceMockRecorder
-}
-
-// MockPersistentVolumeClaimServiceMockRecorder is the mock recorder for MockPersistentVolumeClaimService.
-type MockPersistentVolumeClaimServiceMockRecorder struct {
-	mock *MockPersistentVolumeClaimService
-}
-
-// NewMockPersistentVolumeClaimService creates a new mock instance.
-func NewMockPersistentVolumeClaimService(ctrl *gomock.Controller) *MockPersistentVolumeClaimService {
-	mock := &MockPersistentVolumeClaimService{ctrl: ctrl}
-	mock.recorder = &MockPersistentVolumeClaimServiceMockRecorder{mock}
-	return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockPersistentVolumeClaimService) EXPECT() *MockPersistentVolumeClaimServiceMockRecorder {
-	return m.recorder
-}
-
-// Apply mocks base method.
-func (m *MockPersistentVolumeClaimService) Apply(arg0 context.Context, arg1 string, arg2 *v10.PersistentVolumeClaimApplyConfiguration) (*v1.PersistentVolumeClaim, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Apply", arg0, arg1, arg2)
-	ret0, _ := ret[0].(*v1.PersistentVolumeClaim)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Apply indicates an expected call of Apply.
-func (mr *MockPersistentVolumeClaimServiceMockRecorder) Apply(arg0, arg1, arg2 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockPersistentVolumeClaimService)(nil).Apply), arg0, arg1, arg2)
-}
-
-// Get mocks base method.
-func (m *MockPersistentVolumeClaimService) Get(arg0 context.Context, arg1, arg2 string) (*v1.PersistentVolumeClaim, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Get", arg0, arg1, arg2)
-	ret0, _ := ret[0].(*v1.PersistentVolumeClaim)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Get indicates an expected call of Get.
-func (mr *MockPersistentVolumeClaimServiceMockRecorder) Get(arg0, arg1, arg2 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockPersistentVolumeClaimService)(nil).Get), arg0, arg1, arg2)
-}
-
-// List mocks base method.
-func (m *MockPersistentVolumeClaimService) List(arg0 context.Context, arg1 string) (*v1.PersistentVolumeClaimList, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "List", arg0, arg1)
-	ret0, _ := ret[0].(*v1.PersistentVolumeClaimList)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockPersistentVolumeClaimServiceMockRecorder) List(arg0, arg1 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPersistentVolumeClaimService)(nil).List), arg0, arg1)
-}
diff --git a/simulator/snapshot/mock_snapshot/storageclass.go b/simulator/snapshot/mock_snapshot/storageclass.go
deleted file mode 100644
index da7e1eca..00000000
--- a/simulator/snapshot/mock_snapshot/storageclass.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by MockGen. DO NOT EDIT.
-// Source: sigs.k8s.io/kube-scheduler-simulator/simulator/snapshot (interfaces: StorageClassService)
-
-// Package mock_snapshot is a generated GoMock package.
-package mock_snapshot
-
-import (
-	context "context"
-	reflect "reflect"
-
-	gomock "github.com/golang/mock/gomock"
-	v1 "k8s.io/api/storage/v1"
-	v10 "k8s.io/client-go/applyconfigurations/storage/v1"
-)
-
-// MockStorageClassService is a mock of StorageClassService interface.
-type MockStorageClassService struct {
-	ctrl     *gomock.Controller
-	recorder *MockStorageClassServiceMockRecorder
-}
-
-// MockStorageClassServiceMockRecorder is the mock recorder for MockStorageClassService.
-type MockStorageClassServiceMockRecorder struct {
-	mock *MockStorageClassService
-}
-
-// NewMockStorageClassService creates a new mock instance.
-func NewMockStorageClassService(ctrl *gomock.Controller) *MockStorageClassService {
-	mock := &MockStorageClassService{ctrl: ctrl}
-	mock.recorder = &MockStorageClassServiceMockRecorder{mock}
-	return mock
-}
-
-// EXPECT returns an object that allows the caller to indicate expected use.
-func (m *MockStorageClassService) EXPECT() *MockStorageClassServiceMockRecorder {
-	return m.recorder
-}
-
-// Apply mocks base method.
-func (m *MockStorageClassService) Apply(arg0 context.Context, arg1 *v10.StorageClassApplyConfiguration) (*v1.StorageClass, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "Apply", arg0, arg1)
-	ret0, _ := ret[0].(*v1.StorageClass)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// Apply indicates an expected call of Apply.
-func (mr *MockStorageClassServiceMockRecorder) Apply(arg0, arg1 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Apply", reflect.TypeOf((*MockStorageClassService)(nil).Apply), arg0, arg1)
-}
-
-// List mocks base method.
-func (m *MockStorageClassService) List(arg0 context.Context) (*v1.StorageClassList, error) {
-	m.ctrl.T.Helper()
-	ret := m.ctrl.Call(m, "List", arg0)
-	ret0, _ := ret[0].(*v1.StorageClassList)
-	ret1, _ := ret[1].(error)
-	return ret0, ret1
-}
-
-// List indicates an expected call of List.
-func (mr *MockStorageClassServiceMockRecorder) List(arg0 interface{}) *gomock.Call {
-	mr.mock.ctrl.T.Helper()
-	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockStorageClassService)(nil).List), arg0)
-}
diff --git a/simulator/snapshot/snapshot.go b/simulator/snapshot/snapshot.go
index 34aea1dd..ce2f6fb6 100644
--- a/simulator/snapshot/snapshot.go
+++ b/simulator/snapshot/snapshot.go
@@ -1,12 +1,6 @@
 package snapshot
 
-//go:generate mockgen -destination=./mock_$GOPACKAGE/pod.go . PodService
-//go:generate mockgen -destination=./mock_$GOPACKAGE/node.go . NodeService
-//go:generate mockgen -destination=./mock_$GOPACKAGE/pv.go . PersistentVolumeService
-//go:generate mockgen -destination=./mock_$GOPACKAGE/pvc.go . PersistentVolumeClaimService
-//go:generate mockgen -destination=./mock_$GOPACKAGE/storageclass.go . StorageClassService
 //go:generate mockgen -destination=./mock_$GOPACKAGE/scheduler.go . SchedulerService
-//go:generate mockgen -destination=./mock_$GOPACKAGE/priorityclass.go . PriorityClassService
 
 import (
 	"context"
@@ -30,14 +24,8 @@ import (
 )
 
 type Service struct {
-	client               clientset.Interface
-	podService           PodService
-	nodeService          NodeService
-	pvService            PersistentVolumeService
-	pvcService           PersistentVolumeClaimService
-	storageClassService  StorageClassService
-	priorityClassService PriorityClassService
-	schedulerService     SchedulerService
+	client           clientset.Interface
+	schedulerService SchedulerService
 }
 
 // ResourcesForSnap indicates all resources and scheduler configuration to be snapped.
@@ -64,52 +52,15 @@ type ResourcesForLoad struct {
 	Namespaces      []v1.NamespaceApplyConfiguration                  `json:"namespaces"`
 }
 
-type PodService interface {
-	List(ctx context.Context, namespace string) (*corev1.PodList, error)
-	Apply(ctx context.Context, namespace string, pod *v1.PodApplyConfiguration) (*corev1.Pod, error)
-}
-
-type NodeService interface {
-	List(ctx context.Context) (*corev1.NodeList, error)
-	Apply(ctx context.Context, nac *v1.NodeApplyConfiguration) (*corev1.Node, error)
-}
-
-type PersistentVolumeService interface {
-	List(ctx context.Context) (*corev1.PersistentVolumeList, error)
-	Apply(ctx context.Context, persistentVolume *v1.PersistentVolumeApplyConfiguration) (*corev1.PersistentVolume, error)
-}
-
-type PersistentVolumeClaimService interface {
-	Get(ctx context.Context, name string, namespace string) (*corev1.PersistentVolumeClaim, error)
-	List(ctx context.Context, namespace string) (*corev1.PersistentVolumeClaimList, error)
-	Apply(ctx context.Context, namespace string, persistentVolumeClaime *v1.PersistentVolumeClaimApplyConfiguration) (*corev1.PersistentVolumeClaim, error)
-}
-
-type StorageClassService interface {
-	List(ctx context.Context) (*storagev1.StorageClassList, error)
-	Apply(ctx context.Context, storageClass *confstoragev1.StorageClassApplyConfiguration) (*storagev1.StorageClass, error)
-}
-
-type PriorityClassService interface {
-	List(ctx context.Context) (*schedulingv1.PriorityClassList, error)
-	Apply(ctx context.Context, priorityClass *schedulingcfgv1.PriorityClassApplyConfiguration) (*schedulingv1.PriorityClass, error)
-}
-
 type SchedulerService interface {
 	GetSchedulerConfig() (*configv1.KubeSchedulerConfiguration, error)
 	RestartScheduler(cfg *configv1.KubeSchedulerConfiguration) error
 }
 
-func NewService(client clientset.Interface, pods PodService, nodes NodeService, pvs PersistentVolumeService, pvcs PersistentVolumeClaimService, sc StorageClassService, pc PriorityClassService, schedulers SchedulerService) *Service {
+func NewService(client clientset.Interface, schedulers SchedulerService) *Service {
 	return &Service{
-		client:               client,
-		podService:           pods,
-		nodeService:          nodes,
-		pvService:            pvs,
-		pvcService:           pvcs,
-		storageClassService:  sc,
-		priorityClassService: pc,
-		schedulerService:     schedulers,
+		client:           client,
+		schedulerService: schedulers,
 	}
 }
 
@@ -265,12 +216,12 @@ func (s *Service) Load(ctx context.Context, resources *ResourcesForLoad, opts ..
 
 func (s *Service) listPods(ctx context.Context, r *ResourcesForSnap, eg *util.SemaphoredErrGroup, opts options) error {
 	if err := eg.Go(func() error {
-		pods, err := s.podService.List(ctx, metav1.NamespaceAll)
+		pods, err := s.client.CoreV1().Pods(metav1.NamespaceAll).List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list pods: %w", err)
+				return xerrors.Errorf("call list Pod: %w", err)
 			}
-			klog.Errorf("failed to call list pods: %v", err)
+			klog.Errorf("failed to call list Pod: %v", err)
 			pods = &corev1.PodList{Items: []corev1.Pod{}}
 		}
 		r.Pods = pods.Items
@@ -283,12 +234,12 @@ func (s *Service) listPods(ctx context.Context, r *ResourcesForSnap, eg *util.Se
 
 func (s *Service) listNodes(ctx context.Context, r *ResourcesForSnap, eg *util.SemaphoredErrGroup, opts options) error {
 	if err := eg.Go(func() error {
-		nodes, err := s.nodeService.List(ctx)
+		nodes, err := s.client.CoreV1().Nodes().List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list nodes: %w", err)
+				return xerrors.Errorf("call list Node: %w", err)
 			}
-			klog.Errorf("failed to call list nodes: %v", err)
+			klog.Errorf("failed to call list Node: %v", err)
 			nodes = &corev1.NodeList{Items: []corev1.Node{}}
 		}
 		r.Nodes = nodes.Items
@@ -301,12 +252,12 @@ func (s *Service) listNodes(ctx context.Context, r *ResourcesForSnap, eg *util.S
 
 func (s *Service) listPvs(ctx context.Context, r *ResourcesForSnap, eg *util.SemaphoredErrGroup, opts options) error {
 	if err := eg.Go(func() error {
-		pvs, err := s.pvService.List(ctx)
+		pvs, err := s.client.CoreV1().PersistentVolumes().List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list PersistentVolumes: %w", err)
+				return xerrors.Errorf("call list PersistentVolume: %w", err)
 			}
-			klog.Errorf("failed to call list PersistentVolumes: %v", err)
+			klog.Errorf("failed to call list PersistentVolume: %v", err)
 			pvs = &corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}
 		}
 		r.Pvs = pvs.Items
@@ -319,12 +270,12 @@ func (s *Service) listPvs(ctx context.Context, r *ResourcesForSnap, eg *util.Sem
 
 func (s *Service) listPvcs(ctx context.Context, r *ResourcesForSnap, eg *util.SemaphoredErrGroup, opts options) error {
 	if err := eg.Go(func() error {
-		pvcs, err := s.pvcService.List(ctx, metav1.NamespaceAll)
+		pvcs, err := s.client.CoreV1().PersistentVolumeClaims(metav1.NamespaceAll).List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list PersistentVolumeClaims: %w", err)
+				return xerrors.Errorf("call list PersistentVolumeClaim: %w", err)
 			}
-			klog.Errorf("failed to call list PersistentVolumeClaims: %v", err)
+			klog.Errorf("failed to call list PersistentVolumeClaim: %v", err)
 			pvcs = &corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}
 		}
 		r.Pvcs = pvcs.Items
@@ -337,12 +288,12 @@ func (s *Service) listPvcs(ctx context.Context, r *ResourcesForSnap, eg *util.Se
 
 func (s *Service) listStorageClasses(ctx context.Context, r *ResourcesForSnap, eg *util.SemaphoredErrGroup, opts options) error {
 	if err := eg.Go(func() error {
-		scs, err := s.storageClassService.List(ctx)
+		scs, err := s.client.StorageV1().StorageClasses().List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list storageClasses: %w", err)
+				return xerrors.Errorf("call list StorageClass: %w", err)
 			}
-			klog.Errorf("failed to call list storageClasses: %v", err)
+			klog.Errorf("failed to call list StorageClass: %v", err)
 			scs = &storagev1.StorageClassList{Items: []storagev1.StorageClass{}}
 		}
 		r.StorageClasses = scs.Items
@@ -355,12 +306,12 @@ func (s *Service) listStorageClasses(ctx context.Context, r *ResourcesForSnap, e
 
 func (s *Service) listPcs(ctx context.Context, r *ResourcesForSnap, eg *util.SemaphoredErrGroup, opts options) error {
 	if err := eg.Go(func() error {
-		pcs, err := s.priorityClassService.List(ctx)
+		pcs, err := s.client.SchedulingV1().PriorityClasses().List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list priorityClasses: %w", err)
+				return xerrors.Errorf("call list PriorityClass: %w", err)
 			}
-			klog.Errorf("failed to call list priorityClasses: %v", err)
+			klog.Errorf("failed to call list PriorityClass: %v", err)
 			pcs = &schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}
 		}
 		result := []schedulingv1.PriorityClass{}
@@ -382,9 +333,9 @@ func (s *Service) listNamespaces(ctx context.Context, r *ResourcesForSnap, eg *u
 		nss, err := s.client.CoreV1().Namespaces().List(ctx, metav1.ListOptions{})
 		if err != nil {
 			if !opts.ignoreErr {
-				return xerrors.Errorf("call list namespace: %w", err)
+				return xerrors.Errorf("call list Namespace: %w", err)
 			}
-			klog.Errorf("failed to call list namespace: %v", err)
+			klog.Errorf("failed to call list Namespace: %v", err)
 			nss = &corev1.NamespaceList{Items: []corev1.Namespace{}}
 		}
 		result := []corev1.Namespace{}
@@ -427,7 +378,8 @@ func (s *Service) applyPcs(ctx context.Context, r *ResourcesForLoad, eg *util.Se
 		}
 		if err := eg.Go(func() error {
 			pc.ObjectMetaApplyConfiguration.UID = nil
-			_, err := s.priorityClassService.Apply(ctx, &pc)
+			pc.WithAPIVersion("scheduling.k8s.io/v1").WithKind("PriorityClass")
+			_, err := s.client.SchedulingV1().PriorityClasses().Apply(ctx, &pc, metav1.ApplyOptions{Force: true, FieldManager: "simulator"})
 			if err != nil {
 				if !opts.ignoreErr {
 					return xerrors.Errorf("apply PriorityClass: %w", err)
@@ -447,7 +399,8 @@ func (s *Service) applyStorageClasses(ctx context.Context, r *ResourcesForLoad,
 		sc := r.StorageClasses[i]
 		if err := eg.Go(func() error {
 			sc.ObjectMetaApplyConfiguration.UID = nil
-			_, err := s.storageClassService.Apply(ctx, &sc)
+			sc.WithAPIVersion("storage.k8s.io/v1").WithKind("StorageClass")
+			_, err := s.client.StorageV1().StorageClasses().Apply(ctx, &sc, metav1.ApplyOptions{Force: true, FieldManager: "simulator"})
 			if err != nil {
 				if !opts.ignoreErr {
 					return xerrors.Errorf("apply StorageClass: %w", err)
@@ -467,7 +420,8 @@ func (s *Service) applyPvcs(ctx context.Context, r *ResourcesForLoad, eg *util.S
 		pvc := r.Pvcs[i]
 		if err := eg.Go(func() error {
 			pvc.ObjectMetaApplyConfiguration.UID = nil
-			_, err := s.pvcService.Apply(ctx, *pvc.Namespace, &pvc)
+			pvc.WithAPIVersion("v1").WithKind("PersistentVolumeClaim")
+			_, err := s.client.CoreV1().PersistentVolumeClaims(*pvc.Namespace).Apply(ctx, &pvc, metav1.ApplyOptions{Force: true, FieldManager: "simulator"})
 			if err != nil {
 				if !opts.ignoreErr {
 					return xerrors.Errorf("apply PersistentVolumeClaims: %w", err)
@@ -487,10 +441,11 @@ func (s *Service) applyPvs(ctx context.Context, r *ResourcesForLoad, eg *util.Se
 		pv := r.Pvs[i]
 		if err := eg.Go(func() error {
 			pv.ObjectMetaApplyConfiguration.UID = nil
+			pv.WithAPIVersion("v1").WithKind("PersistentVolume")
 			if pv.Status != nil && pv.Status.Phase != nil {
 				if *pv.Status.Phase == "Bound" {
 					// PersistentVolumeClaims's UID has been changed to a new value.
-					pvc, err := s.pvcService.Get(ctx, *pv.Spec.ClaimRef.Name, *pv.Spec.ClaimRef.Namespace)
+					pvc, err := s.client.CoreV1().PersistentVolumeClaims(*pv.Spec.ClaimRef.Namespace).Get(ctx, *pv.Spec.ClaimRef.Name, metav1.GetOptions{})
 					if err == nil {
 						pv.Spec.ClaimRef.UID = &pvc.UID
 					} else {
@@ -499,7 +454,7 @@ func (s *Service) applyPvs(ctx context.Context, r *ResourcesForLoad, eg *util.Se
 					}
 				}
 			}
-			_, err := s.pvService.Apply(ctx, &pv)
+			_, err := s.client.CoreV1().PersistentVolumes().Apply(ctx, &pv, metav1.ApplyOptions{Force: true, FieldManager: "simulator"})
 			if err != nil {
 				if !opts.ignoreErr {
 					return xerrors.Errorf("apply PersistentVolume: %w", err)
@@ -519,7 +474,8 @@ func (s *Service) applyNodes(ctx context.Context, r *ResourcesForLoad, eg *util.
 		node := r.Nodes[i]
 		if err := eg.Go(func() error {
 			node.ObjectMetaApplyConfiguration.UID = nil
-			_, err := s.nodeService.Apply(ctx, &node)
+			node.WithAPIVersion("v1").WithKind("Node")
+			_, err := s.client.CoreV1().Nodes().Apply(ctx, &node, metav1.ApplyOptions{Force: true, FieldManager: "simulator"})
 			if err != nil {
 				if !opts.ignoreErr {
 					return xerrors.Errorf("apply Node: %w", err)
@@ -539,7 +495,8 @@ func (s *Service) applyPods(ctx context.Context, r *ResourcesForLoad, eg *util.S
 		pod := r.Pods[i]
 		if err := eg.Go(func() error {
 			pod.ObjectMetaApplyConfiguration.UID = nil
-			_, err := s.podService.Apply(ctx, *pod.Namespace, &pod)
+			pod.WithAPIVersion("v1").WithKind("Pod")
+			_, err := s.client.CoreV1().Pods(*pod.Namespace).Apply(ctx, &pod, metav1.ApplyOptions{Force: true, FieldManager: "simulator"})
 			if err != nil {
 				if !opts.ignoreErr {
 					return xerrors.Errorf("apply Pod: %w", err)


Test patch:
diff --git a/simulator/snapshot/snapshot_test.go b/simulator/snapshot/snapshot_test.go
index 2a64be7f..de6c3c5d 100644
--- a/simulator/snapshot/snapshot_test.go
+++ b/simulator/snapshot/snapshot_test.go
@@ -3,7 +3,6 @@ package snapshot
 import (
 	"context"
 	"encoding/json"
-	"errors"
 	"strings"
 	"testing"
 
@@ -20,7 +19,6 @@ import (
 	schedulingcfgv1 "k8s.io/client-go/applyconfigurations/scheduling/v1"
 	confstoragev1 "k8s.io/client-go/applyconfigurations/storage/v1"
 	"k8s.io/client-go/kubernetes/fake"
-	fakecorev1 "k8s.io/client-go/kubernetes/typed/core/v1/fake"
 	k8stesting "k8s.io/client-go/testing"
 	configv1 "k8s.io/kube-scheduler/config/v1"
 
@@ -31,352 +29,479 @@ import (
 )
 
 const (
-	testDefaultNamespaceName1 = "default1"
-	testDefaultNamespaceName2 = "default2"
+	testNamespace1 = "default1"
+	testNamespace2 = "default2"
 )
 
-func TestService_Save(t *testing.T) {
+type (
+	resourceName         string
+	SettingClientFunc    func(context.Context, *fake.Clientset)
+	SettingClientFuncMap map[resourceName]SettingClientFunc
+)
+
+var (
+	ns   resourceName = "namespace"
+	node resourceName = "node"
+	pod  resourceName = "pod"
+	pv   resourceName = "persistentVolume"
+	pvc  resourceName = "persistentVolumeClaim"
+	sc   resourceName = "storageClass"
+	pc   resourceName = "priorityClass"
+	// order indicates calling order in the invokeResourcesFn method.
+	order = []resourceName{
+		ns, node, pod, pv, pvc, sc, pc,
+	}
+	// defaultResForSnapFn returns default expected ResourcesForSnap.
+	defaultResForSnapFn = func() *ResourcesForSnap {
+		return &ResourcesForSnap{
+			Pods: []corev1.Pod{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name:      "pod1",
+						Namespace: testNamespace1,
+					},
+					Spec: corev1.PodSpec{
+						NodeName: "node1",
+					},
+				},
+			},
+			Nodes: []corev1.Node{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name: "node1",
+					},
+				},
+			},
+			Pvs: []corev1.PersistentVolume{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name: "pv1",
+					},
+				},
+			},
+			Pvcs: []corev1.PersistentVolumeClaim{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name:      "pvc1",
+						Namespace: testNamespace1,
+					},
+					Spec: corev1.PersistentVolumeClaimSpec{
+						VolumeName: "pv1",
+					},
+				},
+			},
+			StorageClasses: []storagev1.StorageClass{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name: "sc1",
+					},
+				},
+			},
+			PriorityClasses: []schedulingv1.PriorityClass{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name: "pc1",
+					},
+				},
+			},
+			SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
+			Namespaces: []corev1.Namespace{
+				{
+					ObjectMeta: metav1.ObjectMeta{
+						Name: testNamespace1,
+					},
+				},
+			},
+		}
+	}
+	// defaultApplyFuncs returns default expected settings to fakeClientset for `Apply`.
+	defaultApplyFuncs = SettingClientFuncMap{
+		ns: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &corev1.Namespace{}, nil
+			})
+		},
+		node: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "nodes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &corev1.Node{}, nil
+			})
+		},
+		pod: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "pods", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &corev1.Pod{}, nil
+			})
+		},
+		pv: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "persistentvolumes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &corev1.PersistentVolume{}, nil
+			})
+		},
+		pvc: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &corev1.PersistentVolumeClaim{}, nil
+			})
+		},
+		sc: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "storageclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &storagev1.StorageClass{}, nil
+			})
+		},
+		pc: func(ctx context.Context, c *fake.Clientset) {
+			c.PrependReactor("patch", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+				return true, &schedulingv1.PriorityClass{}, nil
+			})
+		},
+	}
+	// defaultFuncs returns default methods setting to fakeClientset for create each resources.
+	defaultFuncs = SettingClientFuncMap{
+		ns: func(ctx context.Context, c *fake.Clientset) {
+			c.CoreV1().Namespaces().Create(ctx, &corev1.Namespace{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: testNamespace1,
+				},
+			}, metav1.CreateOptions{})
+		},
+		node: func(ctx context.Context, c *fake.Clientset) {
+			c.CoreV1().Nodes().Create(ctx, &corev1.Node{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: "node1",
+				},
+			}, metav1.CreateOptions{})
+		},
+		pod: func(ctx context.Context, c *fake.Clientset) {
+			c.CoreV1().Pods(testNamespace1).Create(ctx, &corev1.Pod{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: "pod1",
+				},
+				Spec: corev1.PodSpec{
+					NodeName: "node1",
+				},
+			}, metav1.CreateOptions{})
+		},
+		pv: func(ctx context.Context, c *fake.Clientset) {
+			c.CoreV1().PersistentVolumes().Create(ctx, &corev1.PersistentVolume{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: "pv1",
+				},
+			}, metav1.CreateOptions{})
+		},
+		pvc: func(ctx context.Context, c *fake.Clientset) {
+			c.CoreV1().PersistentVolumeClaims(testNamespace1).Create(ctx, &corev1.PersistentVolumeClaim{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: "pvc1",
+				},
+				Spec: corev1.PersistentVolumeClaimSpec{
+					VolumeName: "pv1",
+				},
+			}, metav1.CreateOptions{})
+		},
+		sc: func(ctx context.Context, c *fake.Clientset) {
+			c.StorageV1().StorageClasses().Create(ctx, &storagev1.StorageClass{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: "sc1",
+				},
+			}, metav1.CreateOptions{})
+		},
+		pc: func(ctx context.Context, c *fake.Clientset) {
+			c.SchedulingV1().PriorityClasses().Create(ctx, &schedulingv1.PriorityClass{
+				ObjectMeta: metav1.ObjectMeta{
+					Name: "pc1",
+				},
+			}, metav1.CreateOptions{})
+		},
+	}
+	// invokeResourcesFn invokes specified individual methods or baseFuncs.
+	invokeResourcesFn = func(ctx context.Context, c *fake.Clientset, funcs SettingClientFuncMap, baseFuncs SettingClientFuncMap) {
+		for _, n := range order {
+			if fn, ok := funcs[n]; ok {
+				fn(ctx, c)
+				continue
+			}
+			baseFuncs[n](ctx, c)
+		}
+	}
+)
+
+func TestService_Snap(t *testing.T) {
 	t.Parallel()
+
 	tests := []struct {
 		name                     string
-		prepareEachServiceMockFn func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService)
+		prepareEachServiceMockFn func(*mock_snapshot.MockSchedulerService)
 		prepareFakeClientSetFn   func() *fake.Clientset
-		wantReturn               *ResourcesForSnap
-		wantErr                  bool
+		wantReturn               func() *ResourcesForSnap
+		wantErr                  error
 	}{
 		{
-			name: "snap all resources",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap all resources",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
 				// add test data.
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "namespace1",
-					},
-				}, metav1.CreateOptions{})
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces: []corev1.Namespace{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: "namespace1",
-						},
-					},
-				},
-			},
-			wantErr: false,
+			wantReturn: defaultResForSnapFn,
 		},
 		{
-			name: "snap failure on List of PodService",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("list pods"))
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on List Pod",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pod: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "pods", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list Pod")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list Pod: failed to list Pod"),
 		},
 		{
-			name: "snap failure on List of NodeService",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list nodes"))
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on List Node",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					node: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "nodes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list Node")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list Node: failed to list Node"),
 		},
 		{
-			name: "snap failure on List of PersistentVolumeService",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list PersistentVolumes"))
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on List PersistentVolume",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pv: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "persistentvolumes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list PersistentVolume")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list PersistentVolume: failed to list PersistentVolume"),
 		},
 		{
-			name: "snap failure on List of PersistentVolumeClaims",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("list PersistentVolumeClaims"))
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on List PersistentVolumeClaim",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pvc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list PersistentVolumeClaim")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list PersistentVolumeClaim: failed to list PersistentVolumeClaim"),
 		},
 		{
-			name: "snap failure on List of storageClasses",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list storageClasses"))
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on List of StorageClass",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					sc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "storageclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list StorageClass")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list StorageClass: failed to list StorageClass"),
 		},
 		{
-			name: "snap failure on List of priorityClasses",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list priorityClasses"))
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on List PriorityClass",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list PriorityClass")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list PriorityClass: failed to list PriorityClass"),
 		},
 		{
-			name: "snap failure on get scheduler config",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, errors.New("hoge"))
+			name: "Snap failure on List Namespace",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					ns: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list Namespace")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: call list Namespace: failed to list Namespace"),
 		},
 		{
-			name: "snap failure on List of Namespace",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap failure on get scheduler config",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, xerrors.New("failed to get config"))
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				//nolint:forcetypeassert
-				c.CoreV1().(*fakecorev1.FakeCoreV1).PrependReactor("list", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
-					return true, nil, xerrors.New("Error listing namespaces")
-				})
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{}, defaultFuncs)
 				return c
 			},
-			wantReturn: nil,
-			wantErr:    true,
+			wantErr: xerrors.New("failed to get(): get resources all: get scheduler config: failed to get config"),
 		},
 		{
 			name: "get ErrServiceDisabled on get scheduler config, but it's ignored.",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(nil, scheduler.ErrServiceDisabled)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(nil, scheduler.ErrServiceDisabled)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
 				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: nil,
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.SchedulerConfig = nil
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "snap all pods with different namespaces",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{
-					{
-						ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: testDefaultNamespaceName1},
-						Spec:       corev1.PodSpec{NodeName: "node1"},
-					},
-					{
-						ObjectMeta: metav1.ObjectMeta{Name: "pod2", Namespace: testDefaultNamespaceName2},
-						Spec:       corev1.PodSpec{NodeName: "node2"},
-					},
-				}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap all Pods with different namespaces",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: testDefaultNamespaceName1,
-					},
-				}, metav1.CreateOptions{})
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: testDefaultNamespaceName2,
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pod: func(ctx context.Context, c *fake.Clientset) {
+						c.CoreV1().Pods(testNamespace1).Create(ctx, &corev1.Pod{
+							ObjectMeta: metav1.ObjectMeta{
+								Name: "pod1",
+							},
+							Spec: corev1.PodSpec{
+								NodeName: "node1",
+							},
+						}, metav1.CreateOptions{})
+						c.CoreV1().Pods(testNamespace2).Create(ctx, &corev1.Pod{
+							ObjectMeta: metav1.ObjectMeta{
+								Name: "pod2",
+							},
+							Spec: corev1.PodSpec{
+								NodeName: "node1",
+							},
+						}, metav1.CreateOptions{})
 					},
-				}, metav1.CreateOptions{})
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods: []corev1.Pod{
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Pods = []corev1.Pod{
 					{
-						ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: testDefaultNamespaceName1},
+						ObjectMeta: metav1.ObjectMeta{Name: "pod1", Namespace: testNamespace1},
 						Spec:       corev1.PodSpec{NodeName: "node1"},
 					},
 					{
-						ObjectMeta: metav1.ObjectMeta{Name: "pod2", Namespace: testDefaultNamespaceName2},
-						Spec:       corev1.PodSpec{NodeName: "node2"},
-					},
-				},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces: []corev1.Namespace{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: testDefaultNamespaceName1,
-						},
-					},
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: testDefaultNamespaceName2,
-						},
+						ObjectMeta: metav1.ObjectMeta{Name: "pod2", Namespace: testNamespace2},
+						Spec:       corev1.PodSpec{NodeName: "node1"},
 					},
-				},
+				}
+				return r
 			},
 		},
 		{
-			name: "snap all pvcs with different namespaces",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name:      "pvc1",
-							Namespace: testDefaultNamespaceName1,
-						},
-						Spec: corev1.PersistentVolumeClaimSpec{
-							VolumeName: "pv1",
-						},
-					},
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name:      "pvc2",
-							Namespace: testDefaultNamespaceName2,
-						},
-						Spec: corev1.PersistentVolumeClaimSpec{
-							VolumeName: "pv2",
-						},
-					},
-				}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "Snap all pvcs with different namespaces",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: testDefaultNamespaceName1,
-					},
-				}, metav1.CreateOptions{})
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: testDefaultNamespaceName2,
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pvc: func(ctx context.Context, c *fake.Clientset) {
+						c.CoreV1().PersistentVolumeClaims(testNamespace1).Create(ctx, &corev1.PersistentVolumeClaim{
+							ObjectMeta: metav1.ObjectMeta{
+								Name: "pvc1",
+							},
+							Spec: corev1.PersistentVolumeClaimSpec{
+								VolumeName: "pv1",
+							},
+						}, metav1.CreateOptions{})
+						c.CoreV1().PersistentVolumeClaims(testNamespace2).Create(ctx, &corev1.PersistentVolumeClaim{
+							ObjectMeta: metav1.ObjectMeta{
+								Name: "pvc2",
+							},
+							Spec: corev1.PersistentVolumeClaimSpec{
+								VolumeName: "pv1",
+							},
+						}, metav1.CreateOptions{})
 					},
-				}, metav1.CreateOptions{})
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:  []corev1.Pod{},
-				Nodes: []corev1.Node{},
-				Pvs:   []corev1.PersistentVolume{},
-				Pvcs: []corev1.PersistentVolumeClaim{
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Pvcs = []corev1.PersistentVolumeClaim{
 					{
 						ObjectMeta: metav1.ObjectMeta{
 							Name:      "pvc1",
-							Namespace: testDefaultNamespaceName1,
+							Namespace: testNamespace1,
 						},
 						Spec: corev1.PersistentVolumeClaimSpec{
 							VolumeName: "pv1",
@@ -385,30 +510,15 @@ func TestService_Save(t *testing.T) {
 					{
 						ObjectMeta: metav1.ObjectMeta{
 							Name:      "pvc2",
-							Namespace: testDefaultNamespaceName2,
+							Namespace: testNamespace2,
 						},
 						Spec: corev1.PersistentVolumeClaimSpec{
-							VolumeName: "pv2",
-						},
-					},
-				},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces: []corev1.Namespace{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: testDefaultNamespaceName1,
-						},
-					},
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: testDefaultNamespaceName2,
+							VolumeName: "pv1",
 						},
 					},
-				},
+				}
+				return r
 			},
-			wantErr: false,
 		},
 	}
 	for _, tt := range tests {
@@ -416,257 +526,218 @@ func TestService_Save(t *testing.T) {
 		t.Run(tt.name, func(t *testing.T) {
 			t.Parallel()
 			ctrl := gomock.NewController(t)
+			mockSchedulerSvc := mock_snapshot.NewMockSchedulerService(ctrl)
+			fakeClientset := tt.prepareFakeClientSetFn()
 
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
-
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.prepareEachServiceMockFn(mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
+			s := NewService(fakeClientset, mockSchedulerSvc)
+			tt.prepareEachServiceMockFn(mockSchedulerSvc)
 			r, err := s.Snap(context.Background())
 
-			diffResponse := cmp.Diff(r, tt.wantReturn)
-			if diffResponse != "" || (err != nil) != tt.wantErr {
+			var diffResponse string
+			if tt.wantReturn != nil {
+				diffResponse = cmp.Diff(tt.wantReturn(), r)
+			}
+
+			if diffResponse != "" || (err != nil) != (tt.wantErr != nil) {
 				t.Fatalf("Snap() %v test, \nerror = %v,\n%s", tt.name, err, diffResponse)
 			}
+			if tt.wantErr != nil {
+				assert.EqualError(t, tt.wantErr, err.Error())
+			}
 		})
 	}
 }
 
-func TestService_Save_IgnoreErrOption(t *testing.T) {
+func TestService_Snap_IgnoreErrOption(t *testing.T) {
 	t.Parallel()
 	tests := []struct {
 		name                     string
-		prepareEachServiceMockFn func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService)
+		prepareEachServiceMockFn func(*mock_snapshot.MockSchedulerService)
 		prepareFakeClientSetFn   func() *fake.Clientset
-		wantReturn               *ResourcesForSnap
-		wantErr                  bool
+		wantReturn               func() *ResourcesForSnap
+		wantErr                  error
 	}{
 		{
 			name: "snap all resources",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
 				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
-			},
-			wantErr: false,
+			wantReturn: defaultResForSnapFn,
 		},
 		{
-			name: "no error if failure on List of PodService",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("list pods"))
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list Pod",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pod: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "pods", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list Pod")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Pods = []corev1.Pod{}
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on List of NodeService",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list nodes"))
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list Node",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					node: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "nodes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list Node")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Nodes = []corev1.Node{}
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on List of PersistentVolumeService",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list PersistentVolumes"))
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list PersistentVolume",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pv: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "persistentvolumes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list PersistentVolume")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Pvs = []corev1.PersistentVolume{}
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on List of PersistentVolumeClaims",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("list PersistentVolumeClaims"))
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list PersistentVolumeClaims",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pvc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list PersistentVolumeClaim")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Pvcs = []corev1.PersistentVolumeClaim{}
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on List of storageClasses",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list storageClasses"))
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list storageClasses",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					sc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "storageclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list StorageClass")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.StorageClasses = []storagev1.StorageClass{}
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on List of priorityClasses",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(nil, xerrors.Errorf("list priorityClasses"))
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list priorityClasses",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list PriorityClass")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.PriorityClasses = []schedulingv1.PriorityClass{}
+				return r
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failure on List of Namespace",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PodList{Items: []corev1.Pod{}}, nil)
-				nodes.EXPECT().List(gomock.Any()).Return(&corev1.NodeList{Items: []corev1.Node{}}, nil)
-				pvs.EXPECT().List(gomock.Any()).Return(&corev1.PersistentVolumeList{Items: []corev1.PersistentVolume{}}, nil)
-				pvcs.EXPECT().List(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaimList{Items: []corev1.PersistentVolumeClaim{}}, nil)
-				storageClasss.EXPECT().List(gomock.Any()).Return(&storagev1.StorageClassList{Items: []storagev1.StorageClass{}}, nil)
-				pcs.EXPECT().List(gomock.Any()).Return(&schedulingv1.PriorityClassList{Items: []schedulingv1.PriorityClass{}}, nil)
-				schedulers.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
+			name: "no error if failure to list Namespace",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().GetSchedulerConfig().Return(&configv1.KubeSchedulerConfiguration{}, nil)
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				//nolint:forcetypeassert
-				c.CoreV1().(*fakecorev1.FakeCoreV1).PrependReactor("list", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
-					return true, nil, xerrors.New("Error listing namespaces")
-				})
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					ns: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to list Namespace")
+						})
+					},
+				}, defaultFuncs)
 				return c
 			},
-			wantReturn: &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
+			wantReturn: func() *ResourcesForSnap {
+				r := defaultResForSnapFn()
+				r.Namespaces = []corev1.Namespace{}
+				return r
 			},
-			wantErr: false,
 		},
 	}
 	for _, tt := range tests {
@@ -675,633 +746,611 @@ func TestService_Save_IgnoreErrOption(t *testing.T) {
 			t.Parallel()
 			ctrl := gomock.NewController(t)
 
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
-
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.prepareEachServiceMockFn(mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
+			fakeClientset := tt.prepareFakeClientSetFn()
+			mockSchedulerSvc := mock_snapshot.NewMockSchedulerService(ctrl)
+			s := NewService(fakeClientset, mockSchedulerSvc)
+			tt.prepareEachServiceMockFn(mockSchedulerSvc)
 			r, err := s.Snap(context.Background(), s.IgnoreErr())
 
-			diffResponse := cmp.Diff(r, tt.wantReturn)
-			if diffResponse != "" || (err != nil) != tt.wantErr {
-				t.Fatalf("Save() IgnoreErr option, %v test, \nerror = %v, wantErr %v,\n%s", tt.name, err, tt.wantErr, diffResponse)
+			var diffResponse string
+			if tt.wantReturn != nil {
+				diffResponse = cmp.Diff(tt.wantReturn(), r)
 			}
-		})
-	}
-}
 
-// TODO: Ensure that these namespaces are actually applied. Issue #139.
+			if diffResponse != "" || (err != nil) != (tt.wantErr != nil) {
+				t.Fatalf("Snap() %v test, \nerror = %v,\n%s", tt.name, err, diffResponse)
+			}
+			if tt.wantErr != nil {
+				assert.EqualError(t, tt.wantErr, err.Error())
+			}
+		})
+	}
+}
+
 func TestService_Load(t *testing.T) {
 	t.Parallel()
 	tests := []struct {
 		name                     string
-		prepareEachServiceMockFn func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService)
+		prepareEachServiceMockFn func(*mock_snapshot.MockSchedulerService)
 		prepareFakeClientSetFn   func() *fake.Clientset
 		applyConfiguration       func() *ResourcesForLoad
-		wantErr                  bool
+		wantErr                  error
 	}{
 		{
 			name: "load all success",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
 			name: "load all success (with external scheduler enabled.)",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(scheduler.ErrServiceDisabled)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(scheduler.ErrServiceDisabled)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "load failure on Pod Apply",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply pod"))
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply Pod",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("something wrong", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("something wrong", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pod: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "pods", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply Pod")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: true,
+			wantErr: xerrors.New("failed to apply(): apply resources: apply Pod: failed to apply Pod"),
 		},
 		{
-			name: "load failure on Node Apply",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply node"))
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply Node",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("something wrong"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("something wrong"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					node: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "nodes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply Node")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: true,
+			wantErr: xerrors.New("failed to apply(): apply resources: apply Node: failed to apply Node"),
 		},
 		{
-			name: "load failure on PersistentVolume Apply",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply PersistentVolume"))
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply PersistentVolume",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("something wrong").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("something wrong").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pv: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "persistentvolumes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply PersistentVolume")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: true,
+			wantErr: xerrors.New("failed to apply(): apply PVs: apply PersistentVolume: failed to apply PersistentVolume"),
 		},
 		{
-			name: "load failure on PersistentVolumeClaim Apply",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply PersistentVolumeClaim"))
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply PersistentVolumeClaim",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("something wrong", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("something wrong", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pvc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply PersistentVolumeClaim")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: true,
+			wantErr: xerrors.New("failed to apply(): apply resources: apply PersistentVolumeClaims: failed to apply PersistentVolumeClaim"),
 		},
 		{
-			name: "load failure on StorageClass Apply",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply StorageClass"))
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply StorageClass",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("something wrong"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("something wrong"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					sc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "storageclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply StorageClass")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: true,
+			wantErr: xerrors.New("failed to apply(): apply resources: apply StorageClass: failed to apply StorageClass"),
 		},
 		{
-			name: "load failure on PriorityClass Apply",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply PriorityClass"))
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply PriorityClass",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("something wrong"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("SC1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("something wrong"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply PriorityClass")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: true,
+			wantErr: xerrors.New("failed to apply(): apply resources: apply PriorityClass: failed to apply PriorityClass"),
 		},
 		{
-			name: "load success when PersistentVolumeClaim was not found (Get() return err)",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Get(gomock.Any(), "PVC1", gomock.Any()).Return(nil, xerrors.Errorf("get persistentVolumeClaim"))
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load failure to apply Namespace",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Bound")).WithSpec(v1.PersistentVolumeSpec().WithClaimRef(v1.ObjectReference().WithName("PVC1").WithNamespace("default"))))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace("something wrong"),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("SC1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PC1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					ns: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply Namespace")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
+			wantErr: xerrors.New("failed to apply(): apply resources: apply Namespace: failed to apply Namespace"),
 		},
 		{
-			name: "load success when PersistentVolumeClaim was found (Get() return err)",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil)
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load success when PersistentVolumeClaim was not found (Get() return err)",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Bound")).WithSpec(v1.PersistentVolumeSpec().WithClaimRef(v1.ObjectReference().WithName("PVC1").WithNamespace("default"))))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace("something wrong"),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Bound")).WithSpec(v1.PersistentVolumeSpec().WithClaimRef(v1.ObjectReference().WithName("PVC1").WithNamespace(testNamespace1))),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("SC1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PC1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pvc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, &corev1.PersistentVolumeClaim{}, nil
+						})
+						c.PrependReactor("get", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							a, ok := action.(k8stesting.GetAction)
+							assert.Equal(t, true, ok)
+							assert.Equal(t, "PVC1", a.GetName())
+							return true, nil, xerrors.New("pvc not found")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "PV be related with PVC and assign UID",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil)
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil)
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-					assert.Equal(t, "PVC1", *cfg.Spec.ClaimRef.Name)
-					assert.Equal(t, "testUID", string(*cfg.Spec.ClaimRef.UID))
-				})
-				pvcs.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{
-					ObjectMeta: metav1.ObjectMeta{
-						UID: "testUID",
-					},
-				}, nil)
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil)
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil)
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil)
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "load success when PersistentVolumeClaim was found (Get() success)",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Bound")).WithSpec(v1.PersistentVolumeSpec().WithClaimRef(v1.ObjectReference().WithName("PVC1").WithNamespace("default"))))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Bound")).WithSpec(v1.PersistentVolumeSpec().WithClaimRef(v1.ObjectReference().WithName("PVC1").WithNamespace(testNamespace1))),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("SC1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PC1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				return c
-			},
-			wantErr: false,
-		},
-		{
-			name: "success load pv and pvc from json string (UID be set to nil)",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "pv1", *cfg.Name)
-					assert.Empty(t, cfg.ObjectMetaApplyConfiguration.UID)
-				})
-				pvcs.EXPECT().Get(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil)
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "pvc1", *cfg.Name)
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
+				c.PrependReactor("get", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+					a, ok := action.(k8stesting.GetAction)
+					assert.Equal(t, true, ok)
+					assert.Equal(t, "PVC1", a.GetName())
+					o := &corev1.PersistentVolumeClaim{
+						ObjectMeta: metav1.ObjectMeta{
+							UID:  "testUID",
+							Name: "PVC1",
+						},
+						Spec: corev1.PersistentVolumeClaimSpec{
+							VolumeName: "PV1",
+						},
+					}
+					return true, o, nil
 				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
-			},
-			applyConfiguration: func() *ResourcesForLoad {
-				j := `{"pods":[],"nodes":[],`
-				j += `"pvs":[{"metadata":{"name":"pv1","uid":"b0184e68-5ba6-4533-b3fd-bde9416ad03d","resourceVersion":"565","creationTimestamp":"2021-12-28T01:06:35Z","annotations":{"pv.kubernetes.io/bound-by-controller":"yes"},"managedFields":[{"manager":"simulator","operation":"Apply","apiVersion":"v1","time":"2021-12-28T01:06:35Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:accessModes":{},"f:capacity":{"f:storage":{}},"f:hostPath":{"f:path":{},"f:type":{}},"f:persistentVolumeReclaimPolicy":{},"f:volumeMode":{}}}},{"manager":"simulator","operation":"Update","apiVersion":"v1","time":"2021-12-28T01:06:35Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:phase":{}}},"subresource":"status"},{"manager":"simulator","operation":"Update","apiVersion":"v1","time":"2021-12-28T01:06:36Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:pv.kubernetes.io/bound-by-controller":{}}},"f:spec":{"f:claimRef":{}}}}]},"spec":{"capacity":{"storage":"1Gi"},"hostPath":{"path":"/tmp/data","type":"DirectoryOrCreate"},"accessModes":["ReadWriteOnce"],"claimRef":{"kind":"PersistentVolumeClaim","namespace":"default","name":"pvc1","uid":"fb6d1964-41e3-4541-a200-4d76f62b2254","apiVersion":"v1","resourceVersion":"557"},"persistentVolumeReclaimPolicy":"Delete","volumeMode":"Filesystem"},"status":{"phase":"Bound"}}]`
-				j += `,"pvcs":[{"metadata":{"name":"pvc1","namespace":"default","uid":"fb6d1964-41e3-4541-a200-4d76f62b2254","resourceVersion":"567","creationTimestamp":"2021-12-28T01:06:32Z","annotations":{"pv.kubernetes.io/bind-completed":"yes","pv.kubernetes.io/bound-by-controller":"yes"},"managedFields":[{"manager":"simulator","operation":"Apply","apiVersion":"v1","time":"2021-12-28T01:06:32Z","fieldsType":"FieldsV1","fieldsV1":{"f:spec":{"f:accessModes":{},"f:resources":{"f:requests":{"f:storage":{}}},"f:volumeMode":{}}}},{"manager":"simulator","operation":"Update","apiVersion":"v1","time":"2021-12-28T01:06:36Z","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:pv.kubernetes.io/bind-completed":{},"f:pv.kubernetes.io/bound-by-controller":{}}},"f:spec":{"f:volumeName":{}}}},{"manager":"simulator","operation":"Update","apiVersion":"v1","time":"2021-12-28T01:06:36Z","fieldsType":"FieldsV1","fieldsV1":{"f:status":{"f:accessModes":{},"f:capacity":{".":{},"f:storage":{}},"f:phase":{}}},"subresource":"status"}]},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"1Gi"}},"volumeName":"pv1","volumeMode":"Filesystem"},"status":{"phase":"Bound","accessModes":["ReadWriteOnce"],"capacity":{"storage":"1Gi"}}}],"storageClasses":[],"priorityClasses":[],"schedulerConfig":{"parallelism":16,"leaderElection":{"leaderElect":true,"leaseDuration":"15s","renewDeadline":"10s","retryPeriod":"2s","resourceLock":"leases","resourceName":"kube-scheduler","resourceNamespace":"kube-system"},"clientConnection":{"kubeconfig":"","acceptContentTypes":"","contentType":"application/vnd.kubernetes.protobuf","qps":50,"burst":100},"healthzBindAddress":"0.0.0.0:10251","metricsBindAddress":"0.0.0.0:10251","enableProfiling":true,"enableContentionProfiling":true,"percentageOfNodesToScore":0,"podInitialBackoffSeconds":1,"podMaxBackoffSeconds":10,"profiles":[{"schedulerName":"default-scheduler","plugins":{"queueSort":{"enabled":[{"name":"PrioritySort"}]},"preFilter":{"enabled":[{"name":"NodeResourcesFit"},{"name":"NodePorts"},{"name":"VolumeRestrictions"},{"name":"PodTopologySpread"},{"name":"InterPodAffinity"},{"name":"VolumeBinding"},{"name":"NodeAffinity"}]},"filter":{"enabled":[{"name":"NodeUnschedulable"},{"name":"NodeName"},{"name":"TaintToleration"},{"name":"NodeAffinity"},{"name":"NodePorts"},{"name":"NodeResourcesFit"},{"name":"VolumeRestrictions"},{"name":"EBSLimits"},{"name":"GCEPDLimits"},{"name":"NodeVolumeLimits"},{"name":"AzureDiskLimits"},{"name":"VolumeBinding"},{"name":"VolumeZone"},{"name":"PodTopologySpread"},{"name":"InterPodAffinity"}]},"postFilter":{"enabled":[{"name":"DefaultPreemption"}]},"preScore":{"enabled":[{"name":"InterPodAffinity"},{"name":"PodTopologySpread"},{"name":"TaintToleration"},{"name":"NodeAffinity"}]},"score":{"enabled":[{"name":"NodeResourcesBalancedAllocation","weight":1},{"name":"ImageLocality","weight":1},{"name":"InterPodAffinity","weight":1},{"name":"NodeResourcesFit","weight":1},{"name":"NodeAffinity","weight":1},{"name":"PodTopologySpread","weight":2},{"name":"TaintToleration","weight":1}]},"reserve":{"enabled":[{"name":"VolumeBinding"}]},"permit":{},"preBind":{"enabled":[{"name":"VolumeBinding"}]},"bind":{"enabled":[{"name":"DefaultBinder"}]},"postBind":{}},"pluginConfig":[{"name":"DefaultPreemption","args":{"kind":"DefaultPreemptionArgs","apiVersion":"kubescheduler.config.k8s.io/v1","minCandidateNodesPercentage":10,"minCandidateNodesAbsolute":100}},{"name":"InterPodAffinity","args":{"kind":"InterPodAffinityArgs","apiVersion":"kubescheduler.config.k8s.io/v1","hardPodAffinityWeight":1}},{"name":"NodeAffinity","args":{"kind":"NodeAffinityArgs","apiVersion":"kubescheduler.config.k8s.io/v1"}},{"name":"NodeResourcesBalancedAllocation","args":{"kind":"NodeResourcesBalancedAllocationArgs","apiVersion":"kubescheduler.config.k8s.io/v1","resources":[{"name":"cpu","weight":1},{"name":"memory","weight":1}]}},{"name":"NodeResourcesFit","args":{"kind":"NodeResourcesFitArgs","apiVersion":"kubescheduler.config.k8s.io/v1","scoringStrategy":{"type":"LeastAllocated","resources":[{"name":"cpu","weight":1},{"name":"memory","weight":1}]}}},{"name":"PodTopologySpread","args":{"kind":"PodTopologySpreadArgs","apiVersion":"kubescheduler.config.k8s.io/v1","defaultingType":"System"}},{"name":"VolumeBinding","args":{"kind":"VolumeBindingArgs","apiVersion":"kubescheduler.config.k8s.io/v1","bindTimeoutSeconds":600}}]}]}}`
-				b := []byte(j)
-				r := ResourcesForLoad{}
-				if err := json.Unmarshal(b, &r); err != nil {
-					panic(err)
-				}
-				return &r
-			},
-			prepareFakeClientSetFn: func() *fake.Clientset {
-				c := fake.NewSimpleClientset()
 				return c
 			},
-			wantErr: false,
 		},
 		{
 			name: "success load when pv.Status is not exist",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "pv1", *cfg.Name)
-					assert.Empty(t, cfg.Status)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "pvc1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
 				j := `{"pods":[],"nodes":[],`
@@ -1317,21 +1366,18 @@ func TestService_Load(t *testing.T) {
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
+				c.PrependReactor("get", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+					t.Fatal("This will not be called.")
+					return false, nil, nil
+				})
 				return c
 			},
-			wantErr: false,
 		},
 		{
 			name: "success load when pv.Status.Phase is not exist",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "pv1", *cfg.Name)
-					assert.Empty(t, cfg.Status.Phase)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "pvc1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
 				j := `{"pods":[],"nodes":[],`
@@ -1347,123 +1393,13 @@ func TestService_Load(t *testing.T) {
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				return c
-			},
-			wantErr: false,
-		},
-		{
-			name: "load all pods with different namespaces",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), testDefaultNamespaceName1, gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
+				c.PrependReactor("get", "persistentvolumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+					t.Fatal("This will not be called.")
+					return false, nil, nil
 				})
-				pods.EXPECT().Apply(gomock.Any(), testDefaultNamespaceName2, gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod2", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
-			},
-			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", testDefaultNamespaceName1))
-				pods = append(pods, *v1.Pod("Pod2", testDefaultNamespaceName2))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
-				config, _ := schedulerCfg.DefaultSchedulerConfig()
-				return &ResourcesForLoad{
-					Pods:            pods,
-					Nodes:           nodes,
-					Pvs:             pvs,
-					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
-					PriorityClasses: pcs,
-					SchedulerConfig: config,
-				}
-			},
-			prepareFakeClientSetFn: func() *fake.Clientset {
-				c := fake.NewSimpleClientset()
 				return c
 			},
-			wantErr: false,
-		},
-		{
-			name: "load all pvcs with different namespaces",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), testDefaultNamespaceName1, gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), testDefaultNamespaceName2, gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC2", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
-			},
-			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", testDefaultNamespaceName1))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC2", testDefaultNamespaceName2))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
-				config, _ := schedulerCfg.DefaultSchedulerConfig()
-				return &ResourcesForLoad{
-					Pods:            pods,
-					Nodes:           nodes,
-					Pvs:             pvs,
-					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
-					PriorityClasses: pcs,
-					SchedulerConfig: config,
-				}
-			},
-			prepareFakeClientSetFn: func() *fake.Clientset {
-				c := fake.NewSimpleClientset()
-				return c
-			},
-			wantErr: false,
 		},
 	}
 	for _, tt := range tests {
@@ -1472,552 +1408,433 @@ func TestService_Load(t *testing.T) {
 			t.Parallel()
 			ctrl := gomock.NewController(t)
 
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
+			mockSchedulerSve := mock_snapshot.NewMockSchedulerService(ctrl)
+			c := tt.prepareFakeClientSetFn()
 
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.prepareEachServiceMockFn(mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
+			s := NewService(c, mockSchedulerSve)
+			tt.prepareEachServiceMockFn(mockSchedulerSve)
 
-			if err := s.Load(context.Background(), tt.applyConfiguration()); (err != nil) != tt.wantErr {
-				t.Fatalf("Load() %v test, \nerror = %v", tt.name, err)
+			err := s.Load(context.Background(), tt.applyConfiguration())
+			if err != nil && tt.wantErr == nil {
+				t.Fatalf("Expect no error, but Load() returns error = %+v", err)
+			}
+			if tt.wantErr != nil {
+				assert.EqualError(t, err, tt.wantErr.Error(), "expected: %+v\nactual: %+v", tt.wantErr, err)
 			}
 		})
 	}
 }
 
-// TODO: Ensure that these namespaces are actually applied. Issue #139.
 func TestService_Load_WithIgnoreErrOption(t *testing.T) {
 	t.Parallel()
 	tests := []struct {
 		name                     string
-		prepareEachServiceMockFn func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService)
+		prepareEachServiceMockFn func(*mock_snapshot.MockSchedulerService)
 		prepareFakeClientSetFn   func() *fake.Clientset
 		applyConfiguration       func() *ResourcesForLoad
-		wantErr                  bool
+		wantErr                  error
 	}{
 		{
 			name: "load all success",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failure on Apply of Pod",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply pod"))
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "no error if failure to apply Pod",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("something wrong", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("something wrong", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pod: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "pods", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply Pod")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on Apply of Node",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply node"))
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
-			},
-			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("something wrong"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+			name: "no error if failure to apply Node",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			},
+			applyConfiguration: func() *ResourcesForLoad {
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("something wrong"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					node: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "nodes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply Node")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on Apply of PersistentVolume",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply PersistentVolume"))
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "no error if failed to apply PersistentVolume",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("something wrong").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("something wrong").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pv: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "persistentvlumes", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply PersistentVolume")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on Apply of PersistentVolumeClaim",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply PersistentVolumeClaim"))
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "no error if failed to apply PersistentVolumeClaim",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("something wrong", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("something wrong", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pvc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "persistentvlumeclaims", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply PersistentVolumeClaims")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on Apply of StorageClass",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply StorageClass"))
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&schedulingv1.PriorityClass{}, nil).Do(func(_ context.Context, cfg *schedulingcfgv1.PriorityClassApplyConfiguration) {
-					assert.Equal(t, "PriorityClass1", *cfg.Name)
-				})
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "no error if failed to apply StorageClass",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("something wrong"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("something wrong"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					sc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "storageclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply StorageClass")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 		{
-			name: "no error if failed on Apply of PriorityClass",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
-				pods.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.Pod{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PodApplyConfiguration) {
-					assert.Equal(t, "Pod1", *cfg.Name)
-				})
-				nodes.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.Node{}, nil).Do(func(_ context.Context, cfg *v1.NodeApplyConfiguration) {
-					assert.Equal(t, "Node1", *cfg.Name)
-				})
-				pvs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolume{}, nil).Do(func(_ context.Context, cfg *v1.PersistentVolumeApplyConfiguration) {
-					assert.Equal(t, "PV1", *cfg.Name)
-				})
-				pvcs.EXPECT().Apply(gomock.Any(), gomock.Any(), gomock.Any()).Return(&corev1.PersistentVolumeClaim{}, nil).Do(func(_ context.Context, ns string, cfg *v1.PersistentVolumeClaimApplyConfiguration) {
-					assert.Equal(t, "PVC1", *cfg.Name)
-				})
-				storageClasss.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(&storagev1.StorageClass{}, nil).Do(func(_ context.Context, cfg *confstoragev1.StorageClassApplyConfiguration) {
-					assert.Equal(t, "StorageClass1", *cfg.Name)
-				})
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).Return(nil, xerrors.Errorf("apply PriorityClass"))
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
+			name: "no error if failed to apply PriorityClass",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pods = append(pods, *v1.Pod("Pod1", "default"))
-				nodes = append(nodes, *v1.Node("Node1"))
-				pvs = append(pvs, *v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"))
-				pvcs = append(pvcs, *v1.PersistentVolumeClaim("PVC1", "default"))
-				storageclasses = append(storageclasses, *confstoragev1.StorageClass("StorageClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("something wrong"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("something wrong"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					pc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply PriorityClass")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
-		},
-	}
-	for _, tt := range tests {
-		tt := tt
-		t.Run(tt.name, func(t *testing.T) {
-			t.Parallel()
-			ctrl := gomock.NewController(t)
-
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
-
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.prepareEachServiceMockFn(mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-
-			if err := s.Load(context.Background(), tt.applyConfiguration(), s.IgnoreErr()); (err != nil) != tt.wantErr {
-				t.Fatalf("Load() IgnoreErr option, %v test, \nerror = %v, wantErr %v", tt.name, err, tt.wantErr)
-			}
-		})
-	}
-}
-
-func TestFunction_listPcs(t *testing.T) {
-	t.Parallel()
-	tests := []struct {
-		name                   string
-		preparePcServiceMockFn func(pcs *mock_snapshot.MockPriorityClassService)
-		prepareFakeClientSetFn func() *fake.Clientset
-		wantResourcesForSnap   func() *ResourcesForSnap
-		wantErr                bool
-	}{
-		{
-			name: "all pc which have name prefixed with `system-` should filter out",
-			preparePcServiceMockFn: func(pcs *mock_snapshot.MockPriorityClassService) {
-				_pcs := []schedulingv1.PriorityClass{}
-				sysPc := schedulingv1.PriorityClass{}
-				sysPc.Name = "system-cluster-critical"
-				_pcs = append(_pcs, sysPc)
-				nonSysPc := schedulingv1.PriorityClass{}
-				nonSysPc.Name = "priority-class1"
-				_pcs = append(_pcs, nonSysPc)
-				pcslist := schedulingv1.PriorityClassList{}
-				pcslist.Items = _pcs
-				pcs.EXPECT().List(gomock.Any()).Return(&pcslist, nil)
-			},
-			prepareFakeClientSetFn: func() *fake.Clientset {
-				c := fake.NewSimpleClientset()
-				return c
-			},
-			wantResourcesForSnap: func() *ResourcesForSnap {
-				_pcs := []schedulingv1.PriorityClass{}
-				nonSysPc := schedulingv1.PriorityClass{}
-				nonSysPc.Name = "priority-class1"
-				_pcs = append(_pcs, nonSysPc)
-				return &ResourcesForSnap{
-					Pods:            []corev1.Pod{},
-					Nodes:           []corev1.Node{},
-					Pvs:             []corev1.PersistentVolume{},
-					Pvcs:            []corev1.PersistentVolumeClaim{},
-					StorageClasses:  []storagev1.StorageClass{},
-					PriorityClasses: _pcs,
-					SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				}
-			},
-			wantErr: false,
 		},
-	}
-	for _, tt := range tests {
-		tt := tt
-		t.Run(tt.name, func(t *testing.T) {
-			t.Parallel()
-			ctrl := gomock.NewController(t)
-
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
-
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.preparePcServiceMockFn(mockPriorityClassService)
-			ctx := context.Background()
-			errgrp := util.NewErrGroupWithSemaphore(ctx)
-			resources := &ResourcesForSnap{
-				Pods:            []corev1.Pod{},
-				Nodes:           []corev1.Node{},
-				Pvs:             []corev1.PersistentVolume{},
-				Pvcs:            []corev1.PersistentVolumeClaim{},
-				StorageClasses:  []storagev1.StorageClass{},
-				PriorityClasses: []schedulingv1.PriorityClass{},
-				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-			}
-
-			err := s.listPcs(ctx, resources, errgrp, options{})
-			if err := errgrp.Wait(); err != nil {
-				t.Fatalf("listPcs: %v", err)
-			}
-			diffResponse := cmp.Diff(resources, tt.wantResourcesForSnap())
-			if diffResponse != "" || (err != nil) != tt.wantErr {
-				t.Fatalf("listPcs() %v test, \nerror = %v, wantErr %v\n%s", tt.name, err, tt.wantErr, diffResponse)
-			}
-		})
-	}
-}
-
-func TestFunction_applyPcs(t *testing.T) {
-	t.Parallel()
-	tests := []struct {
-		name                     string
-		prepareEachServiceMockFn func(pcs *mock_snapshot.MockPriorityClassService)
-		prepareFakeClientSetFn   func() *fake.Clientset
-		applyConfiguration       func() *ResourcesForLoad
-		wantErr                  bool
-	}{
 		{
-			name: "all pc which have name prefixed with `system-` should filter out",
-			prepareEachServiceMockFn: func(pcs *mock_snapshot.MockPriorityClassService) {
-				pcs.EXPECT().Apply(gomock.Any(), gomock.Any()).DoAndReturn(
-					func(ctx context.Context, pc *schedulingcfgv1.PriorityClassApplyConfiguration) (*schedulingv1.PriorityClass, error) {
-						if strings.HasPrefix(*pc.Name, "system-") {
-							return nil, xerrors.Errorf("apply PriorityClass of system")
-						}
-						return &schedulingv1.PriorityClass{}, nil
-					},
-				).AnyTimes()
+			name: "no error if failed to apply Namespace",
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
+				ss.EXPECT().RestartScheduler(gomock.Any()).Return(nil)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("system-PriorityClass1"))
-				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace("something wrong"),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("SC1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{
+					ns: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("patch", "namespaces", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, nil, xerrors.New("failed to apply Namespace")
+						})
+					},
+				}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 	}
 	for _, tt := range tests {
@@ -2025,86 +1842,76 @@ func TestFunction_applyPcs(t *testing.T) {
 		t.Run(tt.name, func(t *testing.T) {
 			t.Parallel()
 			ctrl := gomock.NewController(t)
-			ctx := context.Background()
-			errgrp := util.NewErrGroupWithSemaphore(ctx)
 
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
+			mockSchedulerSve := mock_snapshot.NewMockSchedulerService(ctrl)
+			c := tt.prepareFakeClientSetFn()
 
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.prepareEachServiceMockFn(mockPriorityClassService)
+			s := NewService(c, mockSchedulerSve)
+			tt.prepareEachServiceMockFn(mockSchedulerSve)
 
-			err := s.applyPcs(ctx, tt.applyConfiguration(), errgrp, options{})
-			if err := errgrp.Wait(); err != nil {
-				t.Fatalf("applyPcs: %v", err)
+			err := s.Load(context.Background(), tt.applyConfiguration(), s.IgnoreErr())
+			if err != nil && tt.wantErr == nil {
+				t.Fatalf("Expect no error, but Load() returns error = %+v", err)
 			}
-
-			if (err != nil) != tt.wantErr {
-				t.Fatalf("applyPcs() %v test, \nerror = %v, wantErr %v", tt.name, err, tt.wantErr)
+			if tt.wantErr != nil {
+				assert.EqualError(t, err, tt.wantErr.Error(), "expected: %+v\nactual: %+v", tt.wantErr, err)
 			}
 		})
 	}
 }
 
-func Test_listNamespaces(t *testing.T) {
+func TestFunction_listPcs(t *testing.T) {
 	t.Parallel()
 	tests := []struct {
 		name                   string
 		prepareFakeClientSetFn func() *fake.Clientset
-		wantResourcesForSnap   func() *ResourcesForSnap
+		wantReturn             func() *ResourcesForSnap
 		wantErr                bool
 	}{
 		{
-			name: "all namespace which have name prefixed with `kube-` or which is default should filter out",
+			name: "all pc which have name prefixed with `system-` should filter out",
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "namespace1",
-					},
-				}, metav1.CreateOptions{})
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "default",
-					},
-				}, metav1.CreateOptions{})
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "kube-system",
-					},
-				}, metav1.CreateOptions{})
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "kube-public",
-					},
-				}, metav1.CreateOptions{})
-				c.CoreV1().Namespaces().Create(context.Background(), &corev1.Namespace{
-					ObjectMeta: metav1.ObjectMeta{
-						Name: "kube-node-lease",
+				ctx := context.Background()
+				// add test data.
+				invokeResourcesFn(ctx, c, SettingClientFuncMap{
+					pc: func(ctx context.Context, c *fake.Clientset) {
+						c.PrependReactor("list", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+							return true, &schedulingv1.PriorityClassList{
+								Items: []schedulingv1.PriorityClass{
+									{
+										ObjectMeta: metav1.ObjectMeta{
+											Name: "system-cluster-critical",
+										},
+									},
+									{
+										ObjectMeta: metav1.ObjectMeta{
+											Name: "priority-class1",
+										},
+									},
+								},
+							}, nil
+						})
 					},
-				}, metav1.CreateOptions{})
+				}, defaultFuncs)
 				return c
 			},
-			wantResourcesForSnap: func() *ResourcesForSnap {
-				nss := []corev1.Namespace{}
-				nonIgnoreNS := corev1.Namespace{}
-				nonIgnoreNS.Name = "namespace1"
-				nss = append(nss, nonIgnoreNS)
+			wantReturn: func() *ResourcesForSnap {
+				_pcs := []schedulingv1.PriorityClass{
+					{
+						ObjectMeta: metav1.ObjectMeta{
+							Name: "priority-class1",
+						},
+					},
+				}
 				return &ResourcesForSnap{
 					Pods:            []corev1.Pod{},
 					Nodes:           []corev1.Node{},
 					Pvs:             []corev1.PersistentVolume{},
 					Pvcs:            []corev1.PersistentVolumeClaim{},
 					StorageClasses:  []storagev1.StorageClass{},
-					PriorityClasses: []schedulingv1.PriorityClass{},
+					PriorityClasses: _pcs,
 					SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-					Namespaces:      nss,
 				}
 			},
 			wantErr: false,
@@ -2116,18 +1923,12 @@ func Test_listNamespaces(t *testing.T) {
 			t.Parallel()
 			ctrl := gomock.NewController(t)
 
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
+			mockSchedulerSve := mock_snapshot.NewMockSchedulerService(ctrl)
+			c := tt.prepareFakeClientSetFn()
 
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			ctx := context.Background()
-			errgrp := util.NewErrGroupWithSemaphore(ctx)
+			s := NewService(c, mockSchedulerSve)
+
+			errgrp := util.NewErrGroupWithSemaphore(context.Background())
 			resources := &ResourcesForSnap{
 				Pods:            []corev1.Pod{},
 				Nodes:           []corev1.Node{},
@@ -2136,22 +1937,21 @@ func Test_listNamespaces(t *testing.T) {
 				StorageClasses:  []storagev1.StorageClass{},
 				PriorityClasses: []schedulingv1.PriorityClass{},
 				SchedulerConfig: &configv1.KubeSchedulerConfiguration{},
-				Namespaces:      []corev1.Namespace{},
 			}
 
-			err := s.listNamespaces(ctx, resources, errgrp, options{})
+			err := s.listPcs(context.Background(), resources, errgrp, options{})
 			if err := errgrp.Wait(); err != nil {
-				t.Fatalf("listNamespaces: %v", err)
+				t.Fatalf("listPcs: %v", err)
 			}
-			diffResponse := cmp.Diff(resources, tt.wantResourcesForSnap())
+			diffResponse := cmp.Diff(resources, tt.wantReturn())
 			if diffResponse != "" || (err != nil) != tt.wantErr {
-				t.Fatalf("listNamespaces() %v test, \nerror = %v, wantErr %v\n%s", tt.name, err, tt.wantErr, diffResponse)
+				t.Fatalf("listPcs() %v test, \nerror = %v, wantErr %v\n%s", tt.name, err, tt.wantErr, diffResponse)
 			}
 		})
 	}
 }
 
-func Test_applyNamespaces(t *testing.T) {
+func TestFunction_applyPcs(t *testing.T) {
 	t.Parallel()
 	tests := []struct {
 		name                   string
@@ -2160,7 +1960,7 @@ func Test_applyNamespaces(t *testing.T) {
 		wantErr                bool
 	}{
 		{
-			name: "all namespace which have name prefixed with `kube-` or which is default should filter out",
+			name: "all pc which have name prefixed with `system-` should filter out",
 			applyConfiguration: func() *ResourcesForLoad {
 				pods := []v1.PodApplyConfiguration{}
 				nodes := []v1.NodeApplyConfiguration{}
@@ -2168,11 +1968,8 @@ func Test_applyNamespaces(t *testing.T) {
 				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
 				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
 				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
-				nss := []v1.NamespaceApplyConfiguration{}
-				nss = append(nss, *v1.Namespace("kube-node-lease"))
-				nss = append(nss, *v1.Namespace("kube-system"))
-				nss = append(nss, *v1.Namespace("kube-public"))
-				nss = append(nss, *v1.Namespace("default"))
+				pcs = append(pcs, *schedulingcfgv1.PriorityClass("system-PriorityClass1"))
+				pcs = append(pcs, *schedulingcfgv1.PriorityClass("PriorityClass1"))
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
 				return &ResourcesForLoad{
 					Pods:            pods,
@@ -2182,11 +1979,17 @@ func Test_applyNamespaces(t *testing.T) {
 					StorageClasses:  storageclasses,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
-					Namespaces:      nss,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				c.PrependReactor("patch", "priorityclasses", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) {
+					a, ok := action.(k8stesting.PatchAction)
+					assert.Equal(t, true, ok)
+					// High priority PriorityClass will not come.
+					assert.Equal(t, true, !strings.HasPrefix(a.GetName(), "system-"))
+					return true, nil, nil
+				})
 				return c
 			},
 			wantErr: false,
@@ -2196,28 +1999,21 @@ func Test_applyNamespaces(t *testing.T) {
 		tt := tt
 		t.Run(tt.name, func(t *testing.T) {
 			t.Parallel()
-			ctrl := gomock.NewController(t)
 			ctx := context.Background()
-			errgrp := util.NewErrGroupWithSemaphore(ctx)
-
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
+			ctrl := gomock.NewController(t)
 
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
+			c := tt.prepareFakeClientSetFn()
+			mockSchedulerSve := mock_snapshot.NewMockSchedulerService(ctrl)
+			s := NewService(c, mockSchedulerSve)
 
-			err := s.applyNamespaces(ctx, tt.applyConfiguration(), errgrp, options{})
+			errgrp := util.NewErrGroupWithSemaphore(ctx)
+			err := s.applyPcs(ctx, tt.applyConfiguration(), errgrp, options{})
 			if err := errgrp.Wait(); err != nil {
-				t.Fatalf("applyNamespaces: %v", err)
+				t.Fatalf("applyPcs: %v", err)
 			}
 
 			if (err != nil) != tt.wantErr {
-				t.Fatalf("applyNamespaces() %v test, \nerror = %v, wantErr %v", tt.name, err, tt.wantErr)
+				t.Fatalf("applyPcs() %v test, \nerror = %v, wantErr %v", tt.name, err, tt.wantErr)
 			}
 		})
 	}
@@ -2227,44 +2023,57 @@ func TestService_Load_WithIgnoreSchedulerConfigurationOption(t *testing.T) {
 	t.Parallel()
 	tests := []struct {
 		name                     string
-		prepareEachServiceMockFn func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService)
+		prepareEachServiceMockFn func(*mock_snapshot.MockSchedulerService)
 		prepareFakeClientSetFn   func() *fake.Clientset
 		applyConfiguration       func() *ResourcesForLoad
-		wantErr                  bool
+		wantErr                  error
 	}{
 		{
 			name: "Load does not call RestartScheduler",
-			prepareEachServiceMockFn: func(pods *mock_snapshot.MockPodService, nodes *mock_snapshot.MockNodeService, pvs *mock_snapshot.MockPersistentVolumeService, pvcs *mock_snapshot.MockPersistentVolumeClaimService, storageClasss *mock_snapshot.MockStorageClassService, pcs *mock_snapshot.MockPriorityClassService, schedulers *mock_snapshot.MockSchedulerService) {
+			prepareEachServiceMockFn: func(ss *mock_snapshot.MockSchedulerService) {
 				// If the Load function call this, it will return the error.
-
 				// RestartScheduler must be called zero times.
-				schedulers.EXPECT().RestartScheduler(gomock.Any()).Times(0)
+				ss.EXPECT().RestartScheduler(gomock.Any()).Times(0)
 			},
 			applyConfiguration: func() *ResourcesForLoad {
-				pods := []v1.PodApplyConfiguration{}
-				nodes := []v1.NodeApplyConfiguration{}
-				pvs := []v1.PersistentVolumeApplyConfiguration{}
-				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{}
-				storageclasses := []confstoragev1.StorageClassApplyConfiguration{}
-				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{}
+				ns := []v1.NamespaceApplyConfiguration{
+					*v1.Namespace(testNamespace1),
+				}
+				pods := []v1.PodApplyConfiguration{
+					*v1.Pod("Pod1", testNamespace1),
+				}
+				nodes := []v1.NodeApplyConfiguration{
+					*v1.Node("Node1"),
+				}
+				pvs := []v1.PersistentVolumeApplyConfiguration{
+					*v1.PersistentVolume("PV1").WithStatus(v1.PersistentVolumeStatus().WithPhase("Pending")).WithUID("test"),
+				}
+				pvcs := []v1.PersistentVolumeClaimApplyConfiguration{
+					*v1.PersistentVolumeClaim("PVC1", testNamespace1),
+				}
+				scs := []confstoragev1.StorageClassApplyConfiguration{
+					*confstoragev1.StorageClass("StorageClass1"),
+				}
+				pcs := []schedulingcfgv1.PriorityClassApplyConfiguration{
+					*schedulingcfgv1.PriorityClass("PriorityClass1"),
+				}
 				config, _ := schedulerCfg.DefaultSchedulerConfig()
-				nss := []v1.NamespaceApplyConfiguration{}
 				return &ResourcesForLoad{
 					Pods:            pods,
 					Nodes:           nodes,
 					Pvs:             pvs,
 					Pvcs:            pvcs,
-					StorageClasses:  storageclasses,
+					StorageClasses:  scs,
 					PriorityClasses: pcs,
 					SchedulerConfig: config,
-					Namespaces:      nss,
+					Namespaces:      ns,
 				}
 			},
 			prepareFakeClientSetFn: func() *fake.Clientset {
 				c := fake.NewSimpleClientset()
+				invokeResourcesFn(context.Background(), c, SettingClientFuncMap{}, defaultApplyFuncs)
 				return c
 			},
-			wantErr: false,
 		},
 	}
 	for _, tt := range tests {
@@ -2273,19 +2082,13 @@ func TestService_Load_WithIgnoreSchedulerConfigurationOption(t *testing.T) {
 			t.Parallel()
 			ctrl := gomock.NewController(t)
 
-			mockSchedulerService := mock_snapshot.NewMockSchedulerService(ctrl)
-			mockPriorityClassService := mock_snapshot.NewMockPriorityClassService(ctrl)
-			mockStorageClassService := mock_snapshot.NewMockStorageClassService(ctrl)
-			mockPVCService := mock_snapshot.NewMockPersistentVolumeClaimService(ctrl)
-			mockPVService := mock_snapshot.NewMockPersistentVolumeService(ctrl)
-			mockNodeService := mock_snapshot.NewMockNodeService(ctrl)
-			mockPodService := mock_snapshot.NewMockPodService(ctrl)
-			fakeclientset := tt.prepareFakeClientSetFn()
+			mockSchedulerSve := mock_snapshot.NewMockSchedulerService(ctrl)
+			c := tt.prepareFakeClientSetFn()
 
-			s := NewService(fakeclientset, mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
-			tt.prepareEachServiceMockFn(mockPodService, mockNodeService, mockPVService, mockPVCService, mockStorageClassService, mockPriorityClassService, mockSchedulerService)
+			s := NewService(c, mockSchedulerSve)
+			tt.prepareEachServiceMockFn(mockSchedulerSve)
 
-			if err := s.Load(context.Background(), tt.applyConfiguration(), s.IgnoreSchedulerConfiguration()); (err != nil) != tt.wantErr {
+			if err := s.Load(context.Background(), tt.applyConfiguration(), s.IgnoreSchedulerConfiguration()); (err != nil) != (tt.wantErr != nil) {
 				t.Fatalf("Load() with ignoreSchedulerConfiguration option, %v test, \nerror = %v, wantErr %v", tt.name, err, tt.wantErr)
 			}
 		})