Improve DSL and use it in tests.