Pester is a TDD unit testing framework for PowerShell with build in Mocking features. Think Google Test & Google Mock combined but for PS, not C++

Pester can also do Code Coverage but this is slightly limited because of the facilities offered by the PS engine (Uses PSBreakpoints which doesn’t capture all code execution.)

C.F.

For example (Note back ticks so parenthesis can start on new line.):