title_body: How can I write unit tests for Plutus contracts?
upvoted_answer: You can use the EmulatorTrace monad introduced in Lecture #4 for unit testing. You find examples of such tests in https://github.com/input-output-hk/plutus/tree/master/plutus-use-cases/test/Spec .