Unit test - An automated test that makes sure a single, isolated piece of code (like a class or method) does what it’s expected to do. Unit tests usually run very quickly and can help build confidence in a tricky piece of code. The best unit tests verify a unit’s behavior, not its implementation—that is, they test what it does, not how it does it. This way the code can be refactored without breaking the test.