We need to keep in mind that there are different possible ways to implement unit tests. Even if your solution differs from the one below, it does not necessarily mean that it is not correct.

Get hands-on with 1200+ tech skills courses.