Add unit tests for examples