diff --git a/cmd/common.go b/cmd/common.go
index 89f45bc4883faec29db8af16b60f7f5411408827..b3df7b954eba2a91261129e641bd4762bd50772e 100644
--- a/cmd/common.go
+++ b/cmd/common.go
@@ -165,7 +165,7 @@ func verifyNodeType(t check.NodeType) {
 	}
 
 	for _, bin := range bins {
-		if !verifyBin(bin, ps) {
+		if !verifyBin(bin) {
 			printlnWarn(fmt.Sprintf("%s is not running", bin))
 		}
 	}
diff --git a/cmd/util.go b/cmd/util.go
index bd12398fcd0e51446fa8883853def8e67aafa954..87b13f01ef52396fa4ba4f79c5c82c26f075325c 100644
--- a/cmd/util.go
+++ b/cmd/util.go
@@ -22,6 +22,14 @@ var (
 	}
 )
 
+var psFunc func(string) string
+var statFunc func(string) (os.FileInfo, error)
+
+func init() {
+	psFunc = ps
+	statFunc = os.Stat
+}
+
 func printlnWarn(msg string) {
 	fmt.Fprintf(os.Stderr, "[%s] %s\n",
 		colors[check.WARN].Sprintf("%s", check.WARN),
@@ -76,7 +84,7 @@ func ps(proc string) string {
 }
 
 // verifyBin checks that the binary specified is running
-func verifyBin(bin string, psFunc func(string) string) bool {
+func verifyBin(bin string) bool {
 
 	// Strip any quotes
 	bin = strings.Trim(bin, "'\"")
@@ -103,9 +111,9 @@ func verifyBin(bin string, psFunc func(string) string) bool {
 }
 
 // findExecutable looks through a list of possible executable names and finds the first one that's running
-func findExecutable(candidates []string, psFunc func(string) string) (string, error) {
+func findExecutable(candidates []string) (string, error) {
 	for _, c := range candidates {
-		if verifyBin(c, psFunc) {
+		if verifyBin(c) {
 			return c, nil
 		}
 	}
diff --git a/cmd/util_test.go b/cmd/util_test.go
index 5da91dee4f9619764d018571425658ff125f6ee7..659dd2e92131e4aa2bfdd030f43096eac4df6c40 100644
--- a/cmd/util_test.go
+++ b/cmd/util_test.go
@@ -97,10 +97,11 @@ func TestVerifyBin(t *testing.T) {
 		{proc: "cmd param", psOut: "cmd", exp: false},
 	}
 
+	psFunc = fakeps
 	for id, c := range cases {
 		t.Run(strconv.Itoa(id), func(t *testing.T) {
 			g = c.psOut
-			v := verifyBin(c.proc, fakeps)
+			v := verifyBin(c.proc)
 			if v != c.exp {
 				t.Fatalf("Expected %v got %v", c.exp, v)
 			}
@@ -120,12 +121,15 @@ func TestFindExecutable(t *testing.T) {
 		{candidates: []string{"one double", "two double", "three double"}, psOut: "two double is running", exp: "two double"},
 		{candidates: []string{"one", "two", "three"}, psOut: "blah", expErr: true},
 		{candidates: []string{"one double", "two double", "three double"}, psOut: "two", expErr: true},
+		{candidates: []string{"apiserver", "kube-apiserver"}, psOut: "kube-apiserver", exp: "kube-apiserver"},
+		{candidates: []string{"apiserver", "kube-apiserver", "hyperkube-apiserver"}, psOut: "kube-apiserver", exp: "kube-apiserver"},
 	}
 
+	psFunc = fakeps
 	for id, c := range cases {
 		t.Run(strconv.Itoa(id), func(t *testing.T) {
 			g = c.psOut
-			e, err := findExecutable(c.candidates, fakeps)
+			e, err := findExecutable(c.candidates)
 			if e != c.exp {
 				t.Fatalf("Expected %v got %v", c.exp, e)
 			}