public void GetCurrentProcess() { Process process = new Process(); Process.Current = process; SelfFunction func = new SelfFunction(); var result = func.Apply(null, null); Assert.IsNotNull(result); Assert.AreSame(process, result); }