Art of unit testing code samples