Examples and test code written in Swift