public async Task GetState(string[] output, AdbState state) { // arrange var processManager = new TestProcessManager(); processManager.AddProcess(output); var adb = new Adb(processManager); var result = await adb.GetState(); processManager.Stub.AssertWasCalled(_ => _.CreateProcess(Arg <string> .Is.Anything, Arg <string> .Matches(commands => commands.Contains("get-state")))); Assert.IsTrue(result == state); }