Applying UML Patterns