I have implemented the specification pattern in swift and made a few tests.