Thanks for the example, this way is very flexible, and great for more complex scenarios, however it seems to me that a future version, the annotations could provide this functionality.
I am developing an application for tests and I am impressed with the ease and speed that has been working with the component.