Add unit tests for examples

@smarterclayton fyi