One thing that we definitely met after we write a unit test for a while is that “There always something we can not control” something I mention could be randomness, time, file IO, database connection, etc. When we met one of these cases the question will arise immediately that “How…